/* Generated by Cython 0.29.21 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "capnp\\helpers\\asyncHelper.h",
            "capnp\\helpers\\asyncIoHelper.h",
            "capnp\\helpers\\capabilityHelper.h",
            "capnp\\helpers\\checkCompiler.h",
            "capnp\\helpers\\fixMaybe.h",
            "capnp\\helpers\\rpcHelper.h",
            "capnp\\helpers\\serialize.h"
        ],
        "extra_compile_args": [
            "/std:c++14",
            "/MD"
        ],
        "extra_link_args": [
            "/MANIFEST"
        ],
        "include_dirs": [
            "."
        ],
        "language": "c++",
        "libraries": [
            "capnpc",
            "capnp-rpc",
            "capnp",
            "kj-async",
            "kj"
        ],
        "name": "capnp.lib.capnp",
        "sources": [
            "capnp/lib\\capnp.pyx",
            "capnp/helpers/capabilityHelper.cpp"
        ]
    },
    "module_name": "capnp.lib.capnp"
}
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 < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_21"
#define CYTHON_HEX_VERSION 0x001D15F0
#define CYTHON_FUTURE_DIVISION 0
#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
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#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_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#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
#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_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(U other) { return *ptr == other; }
    template<typename U> bool operator !=(U other) { return *ptr != other; }
  private:
    T *ptr;
};

#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"
#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #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)
#endif
  #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
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#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_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #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)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #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_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #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]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#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
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? 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 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#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
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#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
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#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) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#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 defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

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

#define __PYX_HAVE__capnp__lib__capnp
#define __PYX_HAVE_API__capnp__lib__capnp
/* Early includes */
#include "capnp/helpers/checkCompiler.h"
#include <string.h>
#include <stdio.h>
#include "capnp/helpers/capabilityHelper.h"
#include "capnp/helpers/rpcHelper.h"
#include "capnp/helpers/asyncHelper.h"
#include <stdint.h>
#include "capnp/dynamic.h"
#include "capnp/orphan.h"
#include "capnp/schema.h"
#include "capnp/any.h"
#include "capnp/blob.h"
#include "capnp/message.h"
#include "capnp/schema.capnp.h"
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include "capnp/common.h"
#include "kj/common.h"
#include "kj/array.h"
#include "capnp/serialize.h"
#include "capnp/serialize-packed.h"
#include "kj/string.h"
#include "kj/exception.h"
#include "kj/memory.h"
#include "kj/async.h"
#include "kj/string-tree.h"
#include "kj/time.h"
#include "kj/async-io.h"
#include "capnp/capability.h"
#include "capnp/rpc-twoparty.h"
#include "capnp/schema-parser.h"
#include "capnp/helpers/asyncIoHelper.h"
#include "capnp/helpers/fixMaybe.h"
#include "capnp/helpers/serialize.h"
#include "pythread.h"
#include <stdlib.h>
#include <kj/string.h>
#include "capnp/list.h"
#include <utility>
#include <capnp/pretty-print.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const 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_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 1
#define __Pyx_PyObject_FromString __Pyx_PyStr_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyStr_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)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#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)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_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 const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const 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_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const 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)
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);
}
#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)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_ASSUME_SAFE_MACROS
#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
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(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) + 1);
    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 CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
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[] = {
  "capnp\\lib\\capnp.pyx",
  "stringsource",
  "capnp\\lib\\capnp.pxd",
  "array.pxd",
  "type.pxd",
  "bool.pxd",
  "complex.pxd",
};
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()


/* "capnp/includes/types.pxd":3
 * from cpython.ref cimport PyObject, Py_INCREF, Py_DECREF
 * from libc.stdint cimport *
 * ctypedef unsigned int uint             # <<<<<<<<<<<<<<
 * ctypedef uint8_t byte
 * ctypedef uint8_t UInt8
 */
typedef unsigned int __pyx_t_5capnp_8includes_5types_uint;

/* "capnp/includes/types.pxd":4
 * from libc.stdint cimport *
 * ctypedef unsigned int uint
 * ctypedef uint8_t byte             # <<<<<<<<<<<<<<
 * ctypedef uint8_t UInt8
 * ctypedef uint16_t UInt16
 */
typedef uint8_t __pyx_t_5capnp_8includes_5types_byte;

/* "capnp/includes/types.pxd":5
 * ctypedef unsigned int uint
 * ctypedef uint8_t byte
 * ctypedef uint8_t UInt8             # <<<<<<<<<<<<<<
 * ctypedef uint16_t UInt16
 * ctypedef uint32_t UInt32
 */
typedef uint8_t __pyx_t_5capnp_8includes_5types_UInt8;

/* "capnp/includes/types.pxd":6
 * ctypedef uint8_t byte
 * ctypedef uint8_t UInt8
 * ctypedef uint16_t UInt16             # <<<<<<<<<<<<<<
 * ctypedef uint32_t UInt32
 * ctypedef uint64_t UInt64
 */
typedef uint16_t __pyx_t_5capnp_8includes_5types_UInt16;

/* "capnp/includes/types.pxd":7
 * ctypedef uint8_t UInt8
 * ctypedef uint16_t UInt16
 * ctypedef uint32_t UInt32             # <<<<<<<<<<<<<<
 * ctypedef uint64_t UInt64
 * ctypedef int8_t Int8
 */
typedef uint32_t __pyx_t_5capnp_8includes_5types_UInt32;

/* "capnp/includes/types.pxd":8
 * ctypedef uint16_t UInt16
 * ctypedef uint32_t UInt32
 * ctypedef uint64_t UInt64             # <<<<<<<<<<<<<<
 * ctypedef int8_t Int8
 * ctypedef int16_t Int16
 */
typedef uint64_t __pyx_t_5capnp_8includes_5types_UInt64;

/* "capnp/includes/types.pxd":9
 * ctypedef uint32_t UInt32
 * ctypedef uint64_t UInt64
 * ctypedef int8_t Int8             # <<<<<<<<<<<<<<
 * ctypedef int16_t Int16
 * ctypedef int32_t Int32
 */
typedef int8_t __pyx_t_5capnp_8includes_5types_Int8;

/* "capnp/includes/types.pxd":10
 * ctypedef uint64_t UInt64
 * ctypedef int8_t Int8
 * ctypedef int16_t Int16             # <<<<<<<<<<<<<<
 * ctypedef int32_t Int32
 * ctypedef int64_t Int64
 */
typedef int16_t __pyx_t_5capnp_8includes_5types_Int16;

/* "capnp/includes/types.pxd":11
 * ctypedef int8_t Int8
 * ctypedef int16_t Int16
 * ctypedef int32_t Int32             # <<<<<<<<<<<<<<
 * ctypedef int64_t Int64
 * 
 */
typedef int32_t __pyx_t_5capnp_8includes_5types_Int32;

/* "capnp/includes/types.pxd":12
 * ctypedef int16_t Int16
 * ctypedef int32_t Int32
 * ctypedef int64_t Int64             # <<<<<<<<<<<<<<
 * 
 * ctypedef char * Object
 */
typedef int64_t __pyx_t_5capnp_8includes_5types_Int64;

/* "capnp/includes/types.pxd":15
 * 
 * ctypedef char * Object
 * ctypedef bint Bool             # <<<<<<<<<<<<<<
 * ctypedef float Float32
 * ctypedef double Float64
 */
typedef int __pyx_t_5capnp_8includes_5types_Bool;

/* "capnp/includes/types.pxd":16
 * ctypedef char * Object
 * ctypedef bint Bool
 * ctypedef float Float32             # <<<<<<<<<<<<<<
 * ctypedef double Float64
 * from libcpp cimport bool as cbool
 */
typedef float __pyx_t_5capnp_8includes_5types_Float32;

/* "capnp/includes/types.pxd":17
 * ctypedef bint Bool
 * ctypedef float Float32
 * ctypedef double Float64             # <<<<<<<<<<<<<<
 * from libcpp cimport bool as cbool
 */
typedef double __pyx_t_5capnp_8includes_5types_Float64;

/*--- Type declarations ---*/
#ifndef _ARRAYARRAY_H
struct arrayobject;
typedef struct arrayobject arrayobject;
#endif
struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField;
struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr;
struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField;
struct __pyx_obj_5capnp_3lib_5capnp__Schema;
struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder;
struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder;
struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper;
struct __pyx_obj_5capnp_3lib_5capnp__NodeReader;
struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder;
struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader;
struct __pyx_obj_5capnp_3lib_5capnp__MessageSize;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder;
struct __pyx_obj_5capnp_3lib_5capnp__EventLoop;
struct __pyx_obj_5capnp_3lib_5capnp__Timer;
struct __pyx_obj_5capnp_3lib_5capnp__CallContext;
struct __pyx_obj_5capnp_3lib_5capnp__Promise;
struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise;
struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise;
struct __pyx_obj_5capnp_3lib_5capnp__Request;
struct __pyx_obj_5capnp_3lib_5capnp__Response;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer;
struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient;
struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient;
struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork;
struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient;
struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer;
struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream;
struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe;
struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream;
struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream;
struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair;
struct __pyx_obj_5capnp_3lib_5capnp__StructSchema;
struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod;
struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema;
struct __pyx_obj_5capnp_3lib_5capnp__SchemaType;
struct __pyx_obj_5capnp_3lib_5capnp__ListSchema;
struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema;
struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder;
struct __pyx_obj_5capnp_3lib_5capnp__MessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes;
struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer;
struct __pyx_obj_5capnp_3lib_5capnp__BufferView;
struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned;
struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader;
struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr;
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load;

/* "capnp/includes/types.pxd":14
 * ctypedef int64_t Int64
 * 
 * ctypedef char * Object             # <<<<<<<<<<<<<<
 * ctypedef bint Bool
 * ctypedef float Float32
 */
typedef char *__pyx_t_5capnp_8includes_5types_Object;

/* "capnp_cpp.pxd":70
 *         Promise[T] attach(Own[PyRefCounter] &, Own[PyRefCounter] &, Own[PyRefCounter] &, Own[PyRefCounter] &)
 * 
 * ctypedef Promise[PyObject *] PyPromise             # <<<<<<<<<<<<<<
 * ctypedef Promise[void] VoidPromise
 * 
 */
typedef  ::kj::Promise<PyObject *>  __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise;

/* "capnp_cpp.pxd":71
 * 
 * ctypedef Promise[PyObject *] PyPromise
 * ctypedef Promise[void] VoidPromise             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "kj/string-tree.h" namespace " ::kj":
 */
typedef  ::kj::Promise<void>  __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise;

/* "capnp_cpp.pxd":102
 *     ctypedef Array[PyObject *] PyArray' ::kj::Array<PyObject *>'
 * 
 * ctypedef Promise[PyArray] PyPromiseArray             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "kj/time.h" namespace " ::kj":
 */
typedef  ::kj::Promise< ::kj::Array<PyObject *>>  __pyx_t_5capnp_8includes_9capnp_cpp_PyPromiseArray;
struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init;
struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader__init;
struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder;
struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init;
struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_init;
struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field;
struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy;
struct __pyx_opt_args_5capnp_3lib_5capnp_remove_event_loop;
struct __pyx_opt_args_5capnp_3lib_5capnp_create_event_loop;
struct __pyx_opt_args_5capnp_3lib_5capnp_reset_event_loop;
struct __pyx_opt_args_5capnp_3lib_5capnp_12_CallContext__get_results;
struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init;
struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_then;
struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_cancel;
struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise__init;
struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_then;
struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_cancel;
struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_then;
struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_cancel;
struct __pyx_opt_args_5capnp_3lib_5capnp_20_PackedMessageReader__init;
struct __pyx_opt_args_5capnp_3lib_5capnp_19_InputMessageReader__init;
struct __pyx_opt_args_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init;

/* "capnp/lib/capnp.pxd":15
 *     cdef C_StructSchema.Field thisptr
 *     cdef object _parent
 *     cdef _init(self, C_StructSchema.Field other, parent=?)             # <<<<<<<<<<<<<<
 * 
 * cdef class _StringArrayPtr:
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init {
  int __pyx_n;
  PyObject *parent;
};

/* "capnp/lib/capnp.pxd":47
 *     cdef object _schema
 * 
 *     cdef _init(self, C_DynamicStruct.Reader other, object parent, bint isRoot=?, bint tryRegistry=?)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get(self, field)
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader__init {
  int __pyx_n;
  int isRoot;
  int tryRegistry;
};

/* "capnp/lib/capnp.pxd":56
 *     cpdef _has_by_field(self, _StructSchemaField field)
 * 
 *     cpdef as_builder(self, num_first_segment_words=?)             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder {
  int __pyx_n;
  PyObject *num_first_segment_words;
};

/* "capnp/lib/capnp.pxd":66
 *     cdef object _schema
 * 
 *     cdef _init(self, DynamicStruct_Builder other, object parent, bint isRoot=?, bint tryRegistry=?)             # <<<<<<<<<<<<<<
 * 
 *     cdef _check_write(self)
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init {
  int __pyx_n;
  int isRoot;
  int tryRegistry;
};

/* "capnp/lib/capnp.pxd":77
 *     cpdef _set(self, field, value)
 *     cpdef _has(self, field)
 *     cpdef init(self, field, size=?)             # <<<<<<<<<<<<<<
 *     cpdef _get_by_field(self, _StructSchemaField field)
 *     cpdef _set_by_field(self, _StructSchemaField field, value)
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_init {
  int __pyx_n;
  PyObject *size;
};

/* "capnp/lib/capnp.pxd":81
 *     cpdef _set_by_field(self, _StructSchemaField field, value)
 *     cpdef _has_by_field(self, _StructSchemaField field)
 *     cpdef _init_by_field(self, _StructSchemaField field, size=?)             # <<<<<<<<<<<<<<
 *     cpdef init_resizable_list(self, field)
 *     cpdef _DynamicEnumField _which(self)
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field {
  int __pyx_n;
  PyObject *size;
};

/* "capnp/lib/capnp.pxd":89
 * 
 *     cpdef as_reader(self)
 *     cpdef copy(self, num_first_segment_words=?)             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicEnumField:
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy {
  int __pyx_n;
  PyObject *num_first_segment_words;
};

/* "capnp/lib/capnp.pyx":1691
 *     return _Timer()._init(helpers.getTimer(C_DEFAULT_EVENT_LOOP_GETTER().thisptr))
 * 
 * cpdef remove_event_loop(ignore_errors=False):             # <<<<<<<<<<<<<<
 *     '''Remove the global event loop'''
 *     global C_DEFAULT_EVENT_LOOP
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_remove_event_loop {
  int __pyx_n;
  PyObject *ignore_errors;
};

/* "capnp/lib/capnp.pyx":1714
 *         _C_DEFAULT_EVENT_LOOP_LOCAL = None
 * 
 * cpdef create_event_loop(threaded=True):             # <<<<<<<<<<<<<<
 *     '''Create a new global event loop. This will not remove the previous
 *     EventLoop for you, so make sure to do that first'''
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_create_event_loop {
  int __pyx_n;
  PyObject *threaded;
};

/* "capnp/lib/capnp.pyx":1728
 *         C_DEFAULT_EVENT_LOOP = _EventLoop()
 * 
 * cpdef reset_event_loop(ignore_errors=False, threaded=True):             # <<<<<<<<<<<<<<
 *     '''Removes event loop, then creates a new one. See remove_event_loop and create_event_loop for more details.'''
 *     remove_event_loop(ignore_errors)
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_reset_event_loop {
  int __pyx_n;
  PyObject *ignore_errors;
  PyObject *threaded;
};

/* "capnp/lib/capnp.pyx":1761
 *            return _DynamicStructReader()._init(self.thisptr.getParams(), self)
 * 
 *     cpdef _get_results(self, uint word_count=0):             # <<<<<<<<<<<<<<
 *         return _DynamicStructBuilder()._init(self.thisptr.getResults(), self) # TODO: pass firstSegmentWordSize
 * 
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_12_CallContext__get_results {
  int __pyx_n;
  __pyx_t_5capnp_8includes_5types_uint word_count;
};

/* "capnp/lib/capnp.pyx":1796
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 *     cdef _init(self, PyPromise other, parent=None):             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         self.thisptr = new PyPromise(movePromise(other))
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init {
  int __pyx_n;
  PyObject *parent;
};

/* "capnp/lib/capnp.pyx":1816
 *         return ret
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_then {
  int __pyx_n;
  PyObject *error_func;
};

/* "capnp/lib/capnp.pyx":1843
 *         return ret
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_cancel {
  int __pyx_n;
  PyObject *numParents;
};

/* "capnp/lib/capnp.pyx":1862
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 *     cdef _init(self, VoidPromise other, parent=None):             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         self.thisptr = new VoidPromise(moveVoidPromise(other))
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise__init {
  int __pyx_n;
  PyObject *parent;
};

/* "capnp/lib/capnp.pyx":1879
 *         self.is_consumed = True
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_then {
  int __pyx_n;
  PyObject *error_func;
};

/* "capnp/lib/capnp.pyx":1911
 *         return ret
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_cancel {
  int __pyx_n;
  PyObject *numParents;
};

/* "capnp/lib/capnp.pyx":1972
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """Promise pipelining, use to queue up operations on a promise before executing the promise."""
 *         if self.is_consumed:
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_then {
  int __pyx_n;
  PyObject *error_func;
};

/* "capnp/lib/capnp.pyx":2019
 *         return _to_dict(self, verbose, ordered)
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_cancel {
  int __pyx_n;
  PyObject *numParents;
};

/* "capnp/lib/capnp.pyx":3526
 *         pass
 * 
 *     cdef _init(self, schema_cpp.BufferedInputStream & stream, traversal_limit_in_words = None, nesting_limit = None, parent = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_20_PackedMessageReader__init {
  int __pyx_n;
  PyObject *traversal_limit_in_words;
  PyObject *nesting_limit;
  PyObject *parent;
};

/* "capnp/lib/capnp.pyx":3573
 *         pass
 * 
 *     cdef _init(self, schema_cpp.BufferedInputStream & stream, traversal_limit_in_words = None, nesting_limit = None, parent = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_19_InputMessageReader__init {
  int __pyx_n;
  PyObject *traversal_limit_in_words;
  PyObject *nesting_limit;
  PyObject *parent;
};

/* "capnp/lib/capnp.pyx":3817
 * 
 * 
 *     cdef _init(self, buf, const char *ptr, Py_ssize_t sz, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         cdef schema_cpp.FlatArrayMessageReader * flat_reader
 */
struct __pyx_opt_args_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init {
  int __pyx_n;
  PyObject *traversal_limit_in_words;
  PyObject *nesting_limit;
};

/* "capnp/lib/capnp.pxd":12
 * 
 * 
 * cdef class _StructSchemaField:             # <<<<<<<<<<<<<<
 *     cdef C_StructSchema.Field thisptr
 *     cdef object _parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchemaField *__pyx_vtab;
   ::capnp::StructSchema::Field thisptr;
  PyObject *_parent;
};


/* "capnp/lib/capnp.pxd":17
 *     cdef _init(self, C_StructSchema.Field other, parent=?)
 * 
 * cdef class _StringArrayPtr:             # <<<<<<<<<<<<<<
 *     cdef StringPtr * thisptr
 *     cdef object parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__StringArrayPtr *__pyx_vtab;
   ::kj::StringPtr *thisptr;
  PyObject *parent;
  size_t size;
};


/* "capnp/lib/capnp.pxd":23
 *     cdef ArrayPtr[StringPtr] asArrayPtr(self) except +reraise_kj_exception
 * 
 * cdef class SchemaParser:             # <<<<<<<<<<<<<<
 *     cdef C_SchemaParser * thisptr
 *     cdef public dict modules_by_id
 */
struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp_SchemaParser *__pyx_vtab;
   ::capnp::SchemaParser *thisptr;
  PyObject *modules_by_id;
  PyObject *_all_imports;
  struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *_last_import_array;
};


/* "capnp/lib/capnp.pxd":30
 *     cpdef _parse_disk_file(self, displayName, diskPath, imports) except +reraise_kj_exception
 * 
 * cdef class _DynamicOrphan:             # <<<<<<<<<<<<<<
 *     cdef C_DynamicOrphan thisptr
 *     cdef public object _parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan *__pyx_vtab;
   ::capnp::Orphan< ::capnp::DynamicValue> thisptr;
  PyObject *_parent;
};


/* "capnp/lib/capnp.pxd":40
 * 
 * 
 * cdef class _DynamicStructReader:             # <<<<<<<<<<<<<<
 *     cdef C_DynamicStruct.Reader thisptr
 *     cdef public object _parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *__pyx_vtab;
   ::capnp::DynamicStruct::Reader thisptr;
  PyObject *_parent;
  int is_root;
  PyObject *_obj_to_pin;
  PyObject *_schema;
};


/* "capnp/lib/capnp.pxd":59
 * 
 * 
 * cdef class _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *     cdef DynamicStruct_Builder thisptr
 *     cdef public object _parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_vtab;
   ::capnp::DynamicStruct::Builder thisptr;
  PyObject *_parent;
  int is_root;
  int _is_written;
  PyObject *_schema;
};


/* "capnp/lib/capnp.pxd":91
 *     cpdef copy(self, num_first_segment_words=?)
 * 
 * cdef class _DynamicEnumField:             # <<<<<<<<<<<<<<
 *     cdef object thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnumField *__pyx_vtab;
  PyObject *thisptr;
};


/* "capnp/lib/capnp.pxd":97
 *     cpdef _str(self)
 * 
 * cdef class _Schema:             # <<<<<<<<<<<<<<
 *     cdef C_Schema thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__Schema {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__Schema *__pyx_vtab;
   ::capnp::Schema thisptr;
};


/* "capnp/lib/capnp.pxd":108
 *     cpdef get_proto(self)
 * 
 * cdef class _InterfaceSchema:             # <<<<<<<<<<<<<<
 *     cdef C_InterfaceSchema thisptr
 *     cdef object __method_names, __method_names_inherited, __methods, __methods_inherited
 */
struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceSchema *__pyx_vtab;
   ::capnp::InterfaceSchema thisptr;
  PyObject *__pyx___method_names;
  PyObject *__pyx___method_names_inherited;
  PyObject *__pyx___methods;
  PyObject *__pyx___methods_inherited;
};


/* "capnp/lib/capnp.pxd":113
 *     cdef _init(self, C_InterfaceSchema other)
 * 
 * cdef class _DynamicEnum:             # <<<<<<<<<<<<<<
 *     cdef capnp.DynamicEnum thisptr
 *     cdef public object _parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnum *__pyx_vtab;
   ::capnp::DynamicEnum thisptr;
  PyObject *_parent;
};


/* "capnp/lib/capnp.pxd":120
 *     cpdef _as_str(self) except +reraise_kj_exception
 * 
 * cdef class _DynamicListBuilder:             # <<<<<<<<<<<<<<
 *     cdef C_DynamicList.Builder thisptr
 *     cdef public object _parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_vtab;
   ::capnp::DynamicList::Builder thisptr;
  PyObject *_parent;
};


/* "capnp/lib/capnp.pxd":133
 *     cpdef init(self, index, size)
 * 
 * cdef class _MessageBuilder:             # <<<<<<<<<<<<<<
 *     cdef schema_cpp.MessageBuilder * thisptr
 *     cpdef init_root(self, schema)
 */
struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder *__pyx_vtab;
   ::capnp::MessageBuilder *thisptr;
};


/* "capnp/lib/capnp.pyx":165
 *                     OTHER = 4)
 * 
 * cdef class _KjExceptionWrapper:             # <<<<<<<<<<<<<<
 *     cdef capnp.Exception * thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_vtab;
   ::kj::Exception *thisptr;
};


/* "capnp/lib/capnp.pyx":314
 *     StringTree printListBuilder" ::capnp::prettyPrint"(C_DynamicList.Builder) except +reraise_kj_exception
 * 
 * cdef class _NodeReader:             # <<<<<<<<<<<<<<
 *     cdef C_Node.Reader thisptr
 *     cdef init(self, C_Node.Reader other):
 */
struct __pyx_obj_5capnp_3lib_5capnp__NodeReader {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__NodeReader *__pyx_vtab;
   ::capnp::schema::Node::Reader thisptr;
};


/* "capnp/lib/capnp.pyx":345
 *             return self.thisptr.isEnum()
 * 
 * cdef class _NestedNodeReader:             # <<<<<<<<<<<<<<
 *     cdef C_Node.NestedNode.Reader thisptr
 *     cdef init(self, C_Node.NestedNode.Reader other):
 */
struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__NestedNodeReader *__pyx_vtab;
   ::capnp::schema::Node::NestedNode::Reader thisptr;
};


/* "capnp/lib/capnp.pyx":358
 *             return self.thisptr.getId()
 * 
 * cdef class _DynamicListReader:             # <<<<<<<<<<<<<<
 *     """Class for reading Cap'n Proto Lists
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListReader *__pyx_vtab;
   ::capnp::DynamicList::Reader thisptr;
  PyObject *_parent;
};


/* "capnp/lib/capnp.pyx":401
 *         return '<capnp list reader %s>' % <char*>strListReader(self.thisptr).cStr()
 * 
 * cdef class _DynamicResizableListBuilder:             # <<<<<<<<<<<<<<
 *     """Class for building growable Cap'n Proto Lists
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_vtab;
  PyObject *_parent;
  PyObject *_message;
  PyObject *_field;
  PyObject *_schema;
  PyObject *_list;
};


/* "capnp/lib/capnp.pyx":559
 *         return '<capnp list builder %s>' % <char*>strListBuilder(self.thisptr).cStr()
 * 
 * cdef class _List_NestedNode_Reader:             # <<<<<<<<<<<<<<
 *     cdef C_Node.NestedNode.Reader.ListNestedNodeReader thisptr
 *     cdef _init(self, List[C_Node.NestedNode].Reader other):
 */
struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_vtab;
  capnp::List<capnp::schema::Node::NestedNode>::Reader thisptr;
};


/* "capnp/lib/capnp.pyx":996
 *         return str(self)
 * 
 * cdef class _MessageSize:             # <<<<<<<<<<<<<<
 *     cdef public uint64_t word_count
 *     cdef public uint cap_count
 */
struct __pyx_obj_5capnp_3lib_5capnp__MessageSize {
  PyObject_HEAD
  uint64_t word_count;
  __pyx_t_5capnp_8includes_5types_uint cap_count;
};


/* "capnp/lib/capnp.pyx":1459
 *         return _struct_reducer, (self.schema.node.id, self.to_bytes())
 * 
 * cdef class _DynamicStructPipeline:             # <<<<<<<<<<<<<<
 *     """Reads Cap'n Proto structs
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_vtab;
   ::capnp::DynamicStruct::Pipeline *thisptr;
  PyObject *_parent;
};


/* "capnp/lib/capnp.pyx":1531
 *         return repr(self.get())
 * 
 * cdef class _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *     cdef C_DynamicObject.Reader thisptr
 *     cdef public object _parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_vtab;
   ::capnp::AnyPointer::Reader thisptr;
  PyObject *_parent;
};


/* "capnp/lib/capnp.pyx":1570
 *         return (<char*>self.thisptr.getAsText().cStr())[:]
 * 
 * cdef class _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *     cdef C_DynamicObject.Builder * thisptr
 *     cdef public object _parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_vtab;
   ::capnp::AnyPointer::Builder *thisptr;
  PyObject *_parent;
};


/* "capnp/lib/capnp.pyx":1632
 *         return _DynamicObjectReader()._init(self.thisptr.asReader(), self._parent)
 * 
 * cdef class _EventLoop:             # <<<<<<<<<<<<<<
 *     cdef capnp.AsyncIoContext * thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__EventLoop {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__EventLoop *__pyx_vtab;
   ::kj::AsyncIoContext *thisptr;
};


/* "capnp/lib/capnp.pyx":1675
 *       return C_DEFAULT_EVENT_LOOP
 * 
 * cdef class _Timer:             # <<<<<<<<<<<<<<
 *     cdef capnp.Timer * thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__Timer {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__Timer *__pyx_vtab;
   ::kj::Timer *thisptr;
};


/* "capnp/lib/capnp.pyx":1747
 *     helpers.pollWaitScope(deref(loop.thisptr).waitScope)
 * 
 * cdef class _CallContext:             # <<<<<<<<<<<<<<
 *     cdef CallContext * thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__CallContext {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__CallContext *__pyx_vtab;
   ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct> *thisptr;
};


/* "capnp/lib/capnp.pyx":1779
 *         return promise
 * 
 * cdef class _Promise:             # <<<<<<<<<<<<<<
 *     cdef PyPromise * thisptr
 *     cdef public bint is_consumed
 */
struct __pyx_obj_5capnp_3lib_5capnp__Promise {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *__pyx_vtab;
  __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise *thisptr;
  int is_consumed;
  PyObject *_parent;
  PyObject *_obj;
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *_event_loop;
};


/* "capnp/lib/capnp.pyx":1852
 * 
 * 
 * cdef class _VoidPromise:             # <<<<<<<<<<<<<<
 *     cdef VoidPromise * thisptr
 *     cdef public bint is_consumed
 */
struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise *__pyx_vtab;
  __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise *thisptr;
  int is_consumed;
  PyObject *_parent;
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *_event_loop;
};


/* "capnp/lib/capnp.pyx":1919
 *         self.thisptr = NULL
 * 
 * cdef class _RemotePromise:             # <<<<<<<<<<<<<<
 *     cdef RemotePromise * thisptr
 *     cdef public bint is_consumed
 */
struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__RemotePromise *__pyx_vtab;
   ::capnp::RemotePromise< ::capnp::DynamicStruct> *thisptr;
  int is_consumed;
  PyObject *_parent;
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *_event_loop;
};


/* "capnp/lib/capnp.pyx":2056
 *     return _Promise()._init(helpers.then(capnp.joinPromises(heap.finish())))
 * 
 * cdef class _Request(_DynamicStructBuilder):             # <<<<<<<<<<<<<<
 *     cdef Request * thisptr_child
 *     cdef public bint is_consumed
 */
struct __pyx_obj_5capnp_3lib_5capnp__Request {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder __pyx_base;
   ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct> *thisptr_child;
  int is_consumed;
};


/* "capnp/lib/capnp.pyx":2075
 *         return _RemotePromise()._init(self.thisptr_child.send(), self._parent)
 * 
 * cdef class _Response(_DynamicStructReader):             # <<<<<<<<<<<<<<
 *     cdef Response * thisptr_child
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__Response {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader __pyx_base;
   ::capnp::Response< ::capnp::DynamicStruct> *thisptr_child;
};


/* "capnp/lib/capnp.pyx":2091
 *         return self
 * 
 * cdef class _DynamicCapabilityServer:             # <<<<<<<<<<<<<<
 *     cdef public _InterfaceSchema schema
 *     cdef public object server
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer {
  PyObject_HEAD
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *schema;
  PyObject *server;
};


/* "capnp/lib/capnp.pyx":2111
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 * cdef class _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *     cdef C_DynamicCapability.Client thisptr
 *     cdef public object _server, _parent, _cached_schema
 */
struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_vtab;
   ::capnp::DynamicCapability::Client thisptr;
  PyObject *_server;
  PyObject *_parent;
  PyObject *_cached_schema;
};


/* "capnp/lib/capnp.pyx":2220
 *         return list(set(self.schema.method_names_inherited) + tuple(dir(self.__class__)))
 * 
 * cdef class _CapabilityClient:             # <<<<<<<<<<<<<<
 *     cdef C_Capability.Client * thisptr
 *     cdef public object _parent
 */
struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__CapabilityClient *__pyx_vtab;
   ::capnp::Capability::Client *thisptr;
  PyObject *_parent;
};


/* "capnp/lib/capnp.pyx":2240
 *         return _DynamicCapabilityClient()._init(self.thisptr.castAs(s.thisptr), self._parent)
 * 
 * cdef class _TwoPartyVatNetwork:             # <<<<<<<<<<<<<<
 *     cdef Own[C_TwoPartyVatNetwork] thisptr
 *     cdef _AsyncIoStream stream
 */
struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_vtab;
   ::kj::Own< ::capnp::TwoPartyVatNetwork>  thisptr;
  struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *stream;
};


/* "capnp/lib/capnp.pyx":2256
 *         return _VoidPromise()._init(deref(self.thisptr).onDisconnect(), self)
 * 
 * cdef class TwoPartyClient:             # <<<<<<<<<<<<<<
 *     """
 *     TwoPartyClient for RPC Communication
 */
struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyClient *__pyx_vtab;
   ::capnp::RpcSystem<capnp::rpc::twoparty::SturdyRefHostId> *thisptr;
  struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *_network;
  PyObject *_orig_stream;
  struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *_stream;
  struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *_pipe;
};


/* "capnp/lib/capnp.pyx":2352
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())
 * 
 * cdef class TwoPartyServer:             # <<<<<<<<<<<<<<
 *     """
 *     TwoPartyServer for RPC Communication
 */
struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyServer *__pyx_vtab;
   ::capnp::RpcSystem<capnp::rpc::twoparty::SturdyRefHostId> *thisptr;
  struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *_network;
  PyObject *_orig_stream;
  PyObject *_disconnect_promise;
  struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *_stream;
  struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *_pipe;
  PyObject *_port;
  PyObject *port_promise;
  PyObject *_bootstrap;
   ::kj::TaskSet *_task_set;
  ErrorHandler _error_handler;
};


/* "capnp/lib/capnp.pyx":2498
 *                 return self._port
 * 
 * cdef class _AsyncIoStream:             # <<<<<<<<<<<<<<
 *     cdef Own[AsyncIoStream] thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream {
  PyObject_HEAD
   ::kj::Own< ::kj::AsyncIoStream>  thisptr;
};


/* "capnp/lib/capnp.pyx":2501
 *     cdef Own[AsyncIoStream] thisptr
 * 
 * cdef class _TwoWayPipe:             # <<<<<<<<<<<<<<
 *     cdef _EventLoop _event_loop
 *     cdef TwoWayPipe _pipe
 */
struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoWayPipe *__pyx_vtab;
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *_event_loop;
   ::kj::TwoWayPipe _pipe;
};


/* "capnp/lib/capnp.pyx":2513
 *         self._pipe = self._event_loop.makeTwoWayPipe()
 * 
 * cdef class _FdAsyncIoStream(_AsyncIoStream):             # <<<<<<<<<<<<<<
 *     cdef _EventLoop _event_loop
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream {
  struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream __pyx_base;
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__FdAsyncIoStream *__pyx_vtab;
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *_event_loop;
};


/* "capnp/lib/capnp.pyx":2523
 *         self.thisptr = self._event_loop.wrapSocketFd(fd)
 * 
 * cdef class PyAsyncIoStream(_AsyncIoStream):             # <<<<<<<<<<<<<<
 *     def __init__(self, int fd):
 *         pass
 */
struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream {
  struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream __pyx_base;
};


/* "capnp/lib/capnp.pyx":2527
 *         pass
 * 
 * cdef class PromiseFulfillerPair:             # <<<<<<<<<<<<<<
 *     cdef Own[C_PromiseFulfillerPair] thisptr
 *     cdef public bint is_consumed
 */
struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_vtab;
   ::kj::Own< ::kj::PromiseFulfillerPair<void>>  thisptr;
  int is_consumed;
  struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *promise;
};


/* "capnp/lib/capnp.pyx":2565
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 * cdef class _StructSchema:             # <<<<<<<<<<<<<<
 *     cdef C_StructSchema thisptr
 *     cdef object __fieldnames, __union_fields, __non_union_fields, __fields, __getters
 */
struct __pyx_obj_5capnp_3lib_5capnp__StructSchema {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *__pyx_vtab;
   ::capnp::StructSchema thisptr;
  PyObject *__pyx___fieldnames;
  PyObject *__pyx___union_fields;
  PyObject *__pyx___non_union_fields;
  PyObject *__pyx___fields;
  PyObject *__pyx___getters;
  PyObject *__pyx___fields_list;
};


/* "capnp/lib/capnp.pyx":2682
 *         return '<field schema for %s>' % self.proto.name
 * 
 * cdef class _InterfaceMethod:             # <<<<<<<<<<<<<<
 *     cdef C_InterfaceSchema.Method thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceMethod *__pyx_vtab;
   ::capnp::InterfaceSchema::Method thisptr;
};


/* "capnp/lib/capnp.pyx":2775
 *         return '<schema for %s>' % self.node.displayName
 * 
 * cdef class _EnumSchema:             # <<<<<<<<<<<<<<
 *     cdef C_EnumSchema thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__EnumSchema *__pyx_vtab;
   ::capnp::EnumSchema thisptr;
};


/* "capnp/lib/capnp.pyx":2798
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 * cdef class _SchemaType:             # <<<<<<<<<<<<<<
 *     cdef capnp.SchemaType thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__SchemaType {
  PyObject_HEAD
   ::capnp::Type thisptr;
};


/* "capnp/lib/capnp.pyx":2878
 * types.AnyPointer = _any_pointer
 * 
 * cdef class _ListSchema:             # <<<<<<<<<<<<<<
 *     cdef C_ListSchema thisptr
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__ListSchema {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__ListSchema *__pyx_vtab;
   ::capnp::ListSchema thisptr;
};


/* "capnp/lib/capnp.pyx":2922
 *             return typeAsSchema(self.thisptr.getElementType())
 * 
 * cdef class _ParsedSchema(_Schema):             # <<<<<<<<<<<<<<
 *     cdef C_ParsedSchema thisptr_child
 *     cdef _init_child(self, C_ParsedSchema other):
 */
struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema {
  struct __pyx_obj_5capnp_3lib_5capnp__Schema __pyx_base;
   ::capnp::ParsedSchema thisptr_child;
};


/* "capnp/lib/capnp.pyx":3423
 *         return _DynamicOrphan()._init(self.thisptr.newOrphan(s.thisptr), self)
 * 
 * cdef class _MallocMessageBuilder(_MessageBuilder):             # <<<<<<<<<<<<<<
 *     """The main class for building Cap'n Proto messages
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder __pyx_base;
};


/* "capnp/lib/capnp.pyx":3444
 *             self.thisptr = new schema_cpp.MallocMessageBuilder(size)
 * 
 * cdef class _MessageReader:             # <<<<<<<<<<<<<<
 *     """An abstract base class for reading Cap'n Proto messages
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__MessageReader {
  PyObject_HEAD
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader *__pyx_vtab;
  PyObject *_parent;
   ::capnp::MessageReader *thisptr;
};


/* "capnp/lib/capnp.pyx":3489
 *         return _DynamicObjectReader()._init(self.thisptr.getRootAnyPointer(), self)
 * 
 * cdef class _StreamFdMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     """Read a Cap'n Proto message from a file descriptor
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader __pyx_base;
};


/* "capnp/lib/capnp.pyx":3511
 * 
 * 
 * cdef class _PackedMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     """Read a Cap'n Proto message from a file descriptor in a packed manner
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader __pyx_base;
};


/* "capnp/lib/capnp.pyx":3537
 * 
 * 
 * cdef class _PackedMessageReaderBytes(_MessageReader):             # <<<<<<<<<<<<<<
 *     cdef schema_cpp.ArrayInputStream * stream
 *     cdef Py_buffer view
 */
struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader __pyx_base;
   ::kj::ArrayInputStream *stream;
  Py_buffer view;
};


/* "capnp/lib/capnp.pyx":3558
 *         PyBuffer_Release(&self.view)
 * 
 * cdef class _InputMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     """Read a Cap'n Proto message from a file descriptor in a packed manner
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader __pyx_base;
};


/* "capnp/lib/capnp.pyx":3584
 * 
 * 
 * cdef class _PackedFdMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     """Read a Cap'n Proto message from a file descriptor in a packed manner
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader __pyx_base;
};


/* "capnp/lib/capnp.pyx":3606
 * 
 * 
 * cdef class _MultipleMessageReader:             # <<<<<<<<<<<<<<
 *     cdef schema_cpp.FdInputStream * stream
 *     cdef schema_cpp.BufferedInputStream * buffered_stream
 */
struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader {
  PyObject_HEAD
   ::kj::FdInputStream *stream;
   ::kj::BufferedInputStream *buffered_stream;
  bool skip_copy;
  PyObject *traversal_limit_in_words;
  PyObject *nesting_limit;
  PyObject *schema;
  PyObject *file;
};


/* "capnp/lib/capnp.pyx":3643
 *         return self
 * 
 * cdef class _MultiplePackedMessageReader:             # <<<<<<<<<<<<<<
 *     cdef schema_cpp.FdInputStream * stream
 *     cdef schema_cpp.BufferedInputStream * buffered_stream
 */
struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader {
  PyObject_HEAD
   ::kj::FdInputStream *stream;
   ::kj::BufferedInputStream *buffered_stream;
  bool skip_copy;
  PyObject *traversal_limit_in_words;
  PyObject *nesting_limit;
  PyObject *schema;
  PyObject *file;
};


/* "capnp/lib/capnp.pyx":3680
 *         return self
 * 
 * cdef class _MultipleBytesMessageReader:             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t offset, sz
 *     cdef const char *ptr
 */
struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader {
  PyObject_HEAD
  Py_ssize_t offset;
  Py_ssize_t sz;
  char const *ptr;
  PyObject *_object_to_pin;
  PyObject *traversal_limit_in_words;
  PyObject *nesting_limit;
  PyObject *schema;
};


/* "capnp/lib/capnp.pyx":3728
 *         return self
 * 
 * cdef class _MultipleBytesPackedMessageReader:             # <<<<<<<<<<<<<<
 *     cdef schema_cpp.ArrayInputStream * stream
 *     cdef schema_cpp.BufferedInputStream * buffered_stream
 */
struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader {
  PyObject_HEAD
   ::kj::ArrayInputStream *stream;
   ::kj::BufferedInputStream *buffered_stream;
  Py_buffer view;
  PyObject *traversal_limit_in_words;
  PyObject *nesting_limit;
  PyObject *schema;
  PyObject *buf;
};


/* "capnp/lib/capnp.pyx":3766
 * 
 * @cython.internal
 * cdef class _AlignedBuffer:             # <<<<<<<<<<<<<<
 *     cdef char * buf
 *     cdef bint allocated
 */
struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer {
  PyObject_HEAD
  char *buf;
  int allocated;
  Py_buffer view;
};


/* "capnp/lib/capnp.pyx":3790
 * 
 * @cython.internal
 * cdef class _BufferView:             # <<<<<<<<<<<<<<
 *     cdef Py_buffer view
 *     cdef char * buf
 */
struct __pyx_obj_5capnp_3lib_5capnp__BufferView {
  PyObject_HEAD
  Py_buffer view;
  char *buf;
};


/* "capnp/lib/capnp.pyx":3804
 * 
 * @cython.internal
 * cdef class _FlatArrayMessageReaderAligned(_MessageReader):             # <<<<<<<<<<<<<<
 *     """
 *     Creates a reader based on a contiguous block of memory
 */
struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader __pyx_base;
  PyObject *_object_to_pin;
  Py_ssize_t msg_size;
};


/* "capnp/lib/capnp.pyx":3835
 * 
 * @cython.internal
 * cdef class _FlatArrayMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     cdef object _object_to_pin
 *     def __init__(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 */
struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader __pyx_base;
  PyObject *_object_to_pin;
};


/* "capnp/lib/capnp.pyx":3870
 * 
 * @cython.internal
 * cdef class _SegmentArrayMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 * 
 *     cdef object _objects_to_pin
 */
struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader __pyx_base;
  PyObject *_objects_to_pin;
   ::kj::ArrayPtr< const ::capnp::word> *_seg_ptrs;
  Py_buffer *views;
};


/* "capnp/lib/capnp.pyx":3907
 * 
 * @cython.internal
 * cdef class _FlatMessageBuilder(_MessageBuilder):             # <<<<<<<<<<<<<<
 *     cdef object _object_to_pin
 *     cdef Py_buffer view
 */
struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder __pyx_base;
  PyObject *_object_to_pin;
  Py_buffer view;
};


/* "capnp/lib/capnp.pyx":152
 *     String strException" ::kj::str"(capnp.Exception)
 * 
 * def _make_enum(enum_name, *sequential, **named):             # <<<<<<<<<<<<<<
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum {
  PyObject_HEAD
  PyObject *__pyx_v_enums;
};


/* "capnp/lib/capnp.pyx":154
 * def _make_enum(enum_name, *sequential, **named):
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())             # <<<<<<<<<<<<<<
 *     enums['reverse_mapping'] = reverse
 *     return type(enum_name, (), enums)
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *__pyx_outer_scope;
  PyObject *__pyx_v_key;
  PyObject *__pyx_v_value;
};


/* "capnp/lib/capnp.pyx":1950
 *         return ret
 * 
 *     async def a_wait(self):             # <<<<<<<<<<<<<<
 *         """
 *         Asyncio version of wait().
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait {
  PyObject_HEAD
  PyObject *__pyx_v_ret;
  struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self;
};


/* "capnp/lib/capnp.pyx":2296
 *         Py_INCREF(self._network) # TODO:MEMORY: attach this to onDrained, also figure out what's leaking
 * 
 *     async def read(self, bufsize):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp reader (asyncio sockets only)
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read {
  PyObject_HEAD
  PyObject *__pyx_v_bufsize;
  arrayobject *__pyx_v_read_buffer;
  AsyncIoStreamReadHelper *__pyx_v_reader;
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self;
};


/* "capnp/lib/capnp.pyx":2409
 *         self._disconnect_promise = self.on_disconnect().then(self._decref)
 * 
 *     async def read(self, bufsize):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp reader (asyncio sockets only)
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read {
  PyObject_HEAD
  PyObject *__pyx_v_bufsize;
  arrayobject *__pyx_v_read_buffer;
  AsyncIoStreamReadHelper *__pyx_v_reader;
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self;
};


/* "capnp/lib/capnp.pyx":2429
 *         return read_buffer
 * 
 *     async def write(self, data):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp writer (asyncio sockets only)
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write {
  PyObject_HEAD
  PyObject *__pyx_v_data;
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self;
  arrayobject *__pyx_v_write_buffer;
};


/* "capnp/lib/capnp.pyx":2473
 *         return poll_once()
 * 
 *     async def poll_forever(self):             # <<<<<<<<<<<<<<
 *         """
 *         Poll libcapnp library forever (asyncio)
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever {
  PyObject_HEAD
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self;
};


/* "capnp/lib/capnp.pyx":2581
 *     property fieldnames:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__fieldnames is not None:
 *                return self.__fieldnames
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ {
  PyObject_HEAD
   ::capnp::StructSchema::FieldList __pyx_v_fieldlist;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_nfields;
};


/* "capnp/lib/capnp.pyx":2586
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 *             self.__fieldnames = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__fieldnames
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *__pyx_outer_scope;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_i;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_0;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
};


/* "capnp/lib/capnp.pyx":2592
 *     property union_fields:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__union_fields is not None:
 *                return self.__union_fields
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ {
  PyObject_HEAD
   ::capnp::StructSchema::FieldSubset __pyx_v_fieldlist;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_nfields;
};


/* "capnp/lib/capnp.pyx":2597
 *             fieldlist = self.thisptr.getUnionFields()
 *             nfields = fieldlist.size()
 *             self.__union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__union_fields
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *__pyx_outer_scope;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_i;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_0;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
};


/* "capnp/lib/capnp.pyx":2603
 *     property non_union_fields:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__non_union_fields is not None:
 *                return self.__non_union_fields
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ {
  PyObject_HEAD
   ::capnp::StructSchema::FieldSubset __pyx_v_fieldlist;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_nfields;
};


/* "capnp/lib/capnp.pyx":2608
 *             fieldlist = self.thisptr.getNonUnionFields()
 *             nfields = fieldlist.size()
 *             self.__non_union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__non_union_fields
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *__pyx_outer_scope;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_i;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_0;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
};


/* "capnp/lib/capnp.pyx":2708
 *     property method_names:
 *         """A tuple of the function names in the interface."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__method_names is not None:
 *                return self.__method_names
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ {
  PyObject_HEAD
   ::capnp::InterfaceSchema::MethodList __pyx_v_fieldlist;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_nfields;
};


/* "capnp/lib/capnp.pyx":2713
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()
 *             self.__method_names = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__method_names
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *__pyx_outer_scope;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_i;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_0;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
};


/* "capnp/lib/capnp.pyx":2719
 *     property method_names_inherited:
 *         """A set of the function names in the interface, including inherited methods"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__method_names_inherited is not None:
 *                return self.__method_names_inherited
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ {
  PyObject_HEAD
   ::capnp::InterfaceSchema::MethodList __pyx_v_fieldlist;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_nfields;
};


/* "capnp/lib/capnp.pyx":2725
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()
 *             self.__method_names_inherited = set(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             for interface in self.superclasses:
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *__pyx_outer_scope;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_i;
};


/* "capnp/lib/capnp.pyx":3195
 *         return ret
 * 
 *     def load(self, file_name, display_name=None, imports=[]):             # <<<<<<<<<<<<<<
 *         """Load a Cap'n Proto schema from a file
 * 
 */
struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load {
  PyObject_HEAD
  PyObject *__pyx_v__load;
  struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self;
};



/* "capnp/lib/capnp.pyx":2663
 *         raise KjException("Schema type is unknown")
 * 
 * cdef class _StructSchemaField:             # <<<<<<<<<<<<<<
 *     cdef _init(self, C_StructSchema.Field other, parent=None):
 *         self.thisptr = other
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchemaField {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *,  ::capnp::StructSchema::Field, struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init *__pyx_optional_args);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchemaField *__pyx_vtabptr_5capnp_3lib_5capnp__StructSchemaField;


/* "capnp/lib/capnp.pyx":3147
 *             setattr(self, name, val)
 * 
 * cdef class _StringArrayPtr:             # <<<<<<<<<<<<<<
 *     def __cinit__(self, size_t size, parent):
 *         self.size = size
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__StringArrayPtr {
   ::kj::ArrayPtr< ::kj::StringPtr>  (*asArrayPtr)(struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__StringArrayPtr *__pyx_vtabptr_5capnp_3lib_5capnp__StringArrayPtr;


/* "capnp/lib/capnp.pyx":3160
 * 
 * 
 * cdef class SchemaParser:             # <<<<<<<<<<<<<<
 *     """A class for loading Cap'n Proto schema files.
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp_SchemaParser {
  PyObject *(*_parse_disk_file)(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp_SchemaParser *__pyx_vtabptr_5capnp_3lib_5capnp_SchemaParser;


/* "capnp/lib/capnp.pyx":1509
 *         return _to_dict(self, verbose, ordered)
 * 
 * cdef class _DynamicOrphan:             # <<<<<<<<<<<<<<
 *     cdef _init(self, C_DynamicOrphan other, object parent):
 *         self.thisptr = moveOrphan(other)
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *,  ::capnp::Orphan< ::capnp::DynamicValue>, PyObject *);
   ::capnp::Orphan< ::capnp::DynamicValue> (*move)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *);
  PyObject *(*get)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicOrphan;


/* "capnp/lib/capnp.pyx":1010
 *         return _global_schema_parser.modules_by_id[schema_id].from_bytes(data)
 * 
 * cdef class _DynamicStructReader:             # <<<<<<<<<<<<<<
 *     """Reads Cap'n Proto structs
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *,  ::capnp::DynamicStruct::Reader, PyObject *, struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader__init *__pyx_optional_args);
  PyObject *(*_get)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_has)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *(*_which)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, int __pyx_skip_dispatch);
  PyObject *(*_which_str)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, int __pyx_skip_dispatch);
  PyObject *(*_get_by_field)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch);
  PyObject *(*_has_by_field)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch);
  PyObject *(*as_builder)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder *__pyx_optional_args);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructReader;


/* "capnp/lib/capnp.pyx":1122
 * 
 * 
 * cdef class _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *     """Builds Cap'n Proto structs
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *,  ::capnp::DynamicStruct::Builder, PyObject *, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init *__pyx_optional_args);
  PyObject *(*_check_write)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *);
  PyObject *(*to_bytes)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch);
  PyObject *(*to_segments)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch);
  PyObject *(*_to_bytes_packed_helper)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*to_bytes_packed)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch);
  PyObject *(*_get)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_set)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_has)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_init *__pyx_optional_args);
  PyObject *(*_get_by_field)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch);
  PyObject *(*_set_by_field)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_has_by_field)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch);
  PyObject *(*_init_by_field)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field *__pyx_optional_args);
  PyObject *(*init_resizable_list)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch);
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *(*_which)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch);
  PyObject *(*_which_str)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch);
  PyObject *(*adopt)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *, int __pyx_skip_dispatch);
  PyObject *(*disown)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*as_reader)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch);
  PyObject *(*copy)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy *__pyx_optional_args);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructBuilder;


/* "capnp/lib/capnp.pyx":955
 * 
 * 
 * cdef class _DynamicEnumField:             # <<<<<<<<<<<<<<
 *     cdef _init(self, proto):
 *         self.thisptr = proto
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnumField {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *, PyObject *);
  PyObject *(*_str)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnumField *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicEnumField;


/* "capnp/lib/capnp.pyx":2540
 *         deref(deref(self.thisptr).fulfiller).fulfill()
 * 
 * cdef class _Schema:             # <<<<<<<<<<<<<<
 *     cdef _init(self, C_Schema other):
 *         self.thisptr = other
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__Schema {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *,  ::capnp::Schema);
  PyObject *(*as_const_value)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch);
  PyObject *(*as_struct)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch);
  PyObject *(*as_interface)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch);
  PyObject *(*as_enum)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch);
  PyObject *(*get_proto)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Schema *__pyx_vtabptr_5capnp_3lib_5capnp__Schema;


/* "capnp/lib/capnp.pyx":2701
 *             return _StructSchema()._init(self.thisptr.getResultType())
 * 
 * cdef class _InterfaceSchema:             # <<<<<<<<<<<<<<
 *     cdef _init(self, C_InterfaceSchema other):
 *         self.thisptr = other
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceSchema {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *,  ::capnp::InterfaceSchema);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceSchema *__pyx_vtabptr_5capnp_3lib_5capnp__InterfaceSchema;


/* "capnp/lib/capnp.pyx":912
 * 
 * 
 * cdef class _DynamicEnum:             # <<<<<<<<<<<<<<
 *     cdef _init(self, capnp.DynamicEnum other, object parent):
 *         self.thisptr = other
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnum {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *,  ::capnp::DynamicEnum, PyObject *);
  PyObject *(*_as_str)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnum *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicEnum;


/* "capnp/lib/capnp.pyx":468
 *             i += 1
 * 
 * cdef class _DynamicListBuilder:             # <<<<<<<<<<<<<<
 *     """Class for building Cap'n Proto Lists
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *,  ::capnp::DynamicList::Builder, PyObject *);
  PyObject *(*_get)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, int64_t, int __pyx_skip_dispatch);
  PyObject *(*_set)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*adopt)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *, int __pyx_skip_dispatch);
  PyObject *(*disown)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicListBuilder;


/* "capnp/lib/capnp.pyx":3303
 *         return module
 * 
 * cdef class _MessageBuilder:             # <<<<<<<<<<<<<<
 *     """An abstract base class for building Cap'n Proto messages
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder {
  PyObject *(*init_root)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_root)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_root_as_any)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, int __pyx_skip_dispatch);
  PyObject *(*set_root)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_segments_for_output)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, int __pyx_skip_dispatch);
  PyObject *(*new_orphan)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder *__pyx_vtabptr_5capnp_3lib_5capnp__MessageBuilder;


/* "capnp/lib/capnp.pyx":165
 *                     OTHER = 4)
 * 
 * cdef class _KjExceptionWrapper:             # <<<<<<<<<<<<<<
 *     cdef capnp.Exception * thisptr
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__KjExceptionWrapper {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *,  ::kj::Exception &);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_vtabptr_5capnp_3lib_5capnp__KjExceptionWrapper;


/* "capnp/lib/capnp.pyx":314
 *     StringTree printListBuilder" ::capnp::prettyPrint"(C_DynamicList.Builder) except +reraise_kj_exception
 * 
 * cdef class _NodeReader:             # <<<<<<<<<<<<<<
 *     cdef C_Node.Reader thisptr
 *     cdef init(self, C_Node.Reader other):
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__NodeReader {
  PyObject *(*init)(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *,  ::capnp::schema::Node::Reader);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__NodeReader *__pyx_vtabptr_5capnp_3lib_5capnp__NodeReader;


/* "capnp/lib/capnp.pyx":345
 *             return self.thisptr.isEnum()
 * 
 * cdef class _NestedNodeReader:             # <<<<<<<<<<<<<<
 *     cdef C_Node.NestedNode.Reader thisptr
 *     cdef init(self, C_Node.NestedNode.Reader other):
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__NestedNodeReader {
  PyObject *(*init)(struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *,  ::capnp::schema::Node::NestedNode::Reader);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__NestedNodeReader *__pyx_vtabptr_5capnp_3lib_5capnp__NestedNodeReader;


/* "capnp/lib/capnp.pyx":358
 *             return self.thisptr.getId()
 * 
 * cdef class _DynamicListReader:             # <<<<<<<<<<<<<<
 *     """Class for reading Cap'n Proto Lists
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListReader {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *,  ::capnp::DynamicList::Reader, PyObject *);
  PyObject *(*_get)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *, int64_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListReader *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicListReader;


/* "capnp/lib/capnp.pyx":401
 *         return '<capnp list reader %s>' % <char*>strListReader(self.thisptr).cStr()
 * 
 * cdef class _DynamicResizableListBuilder:             # <<<<<<<<<<<<<<
 *     """Class for building growable Cap'n Proto Lists
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicResizableListBuilder {
  PyObject *(*add)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *, int __pyx_skip_dispatch);
  PyObject *(*_get)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicResizableListBuilder;


/* "capnp/lib/capnp.pyx":559
 *         return '<capnp list builder %s>' % <char*>strListBuilder(self.thisptr).cStr()
 * 
 * cdef class _List_NestedNode_Reader:             # <<<<<<<<<<<<<<
 *     cdef C_Node.NestedNode.Reader.ListNestedNodeReader thisptr
 *     cdef _init(self, List[C_Node.NestedNode].Reader other):
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__List_NestedNode_Reader {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *,  ::capnp::List< ::capnp::schema::Node::NestedNode> ::Reader);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_vtabptr_5capnp_3lib_5capnp__List_NestedNode_Reader;


/* "capnp/lib/capnp.pyx":1459
 *         return _struct_reducer, (self.schema.node.id, self.to_bytes())
 * 
 * cdef class _DynamicStructPipeline:             # <<<<<<<<<<<<<<
 *     """Reads Cap'n Proto structs
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructPipeline {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *,  ::capnp::DynamicStruct::Pipeline *, PyObject *);
  PyObject *(*_get)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructPipeline;


/* "capnp/lib/capnp.pyx":1531
 *         return repr(self.get())
 * 
 * cdef class _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *     cdef C_DynamicObject.Reader thisptr
 *     cdef public object _parent
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectReader {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *,  ::capnp::AnyPointer::Reader, PyObject *);
  PyObject *(*as_struct)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*as_interface)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*as_list)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*as_text)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicObjectReader;


/* "capnp/lib/capnp.pyx":1570
 *         return (<char*>self.thisptr.getAsText().cStr())[:]
 * 
 * cdef class _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *     cdef C_DynamicObject.Builder * thisptr
 *     cdef public object _parent
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectBuilder {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *,  ::capnp::AnyPointer::Builder, PyObject *);
  PyObject *(*as_struct)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*as_interface)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*as_list)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*set)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*set_as_text)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*init_as_list)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*as_text)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, int __pyx_skip_dispatch);
  PyObject *(*as_reader)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicObjectBuilder;


/* "capnp/lib/capnp.pyx":1632
 *         return _DynamicObjectReader()._init(self.thisptr.asReader(), self._parent)
 * 
 * cdef class _EventLoop:             # <<<<<<<<<<<<<<
 *     cdef capnp.AsyncIoContext * thisptr
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__EventLoop {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *);
  PyObject *(*_remove)(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *, int __pyx_skip_dispatch);
   ::kj::TwoWayPipe (*makeTwoWayPipe)(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *);
   ::kj::Own< ::kj::AsyncIoStream>  (*wrapSocketFd)(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *, int);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__EventLoop *__pyx_vtabptr_5capnp_3lib_5capnp__EventLoop;


/* "capnp/lib/capnp.pyx":1675
 *       return C_DEFAULT_EVENT_LOOP
 * 
 * cdef class _Timer:             # <<<<<<<<<<<<<<
 *     cdef capnp.Timer * thisptr
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__Timer {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__Timer *,  ::kj::Timer *);
  PyObject *(*after_delay)(struct __pyx_obj_5capnp_3lib_5capnp__Timer *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Timer *__pyx_vtabptr_5capnp_3lib_5capnp__Timer;


/* "capnp/lib/capnp.pyx":1747
 *     helpers.pollWaitScope(deref(loop.thisptr).waitScope)
 * 
 * cdef class _CallContext:             # <<<<<<<<<<<<<<
 *     cdef CallContext * thisptr
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__CallContext {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *,  ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct>);
  PyObject *(*_get_results)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_CallContext__get_results *__pyx_optional_args);
  PyObject *(*release_params)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *, int __pyx_skip_dispatch);
  PyObject *(*allow_cancellation)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *, int __pyx_skip_dispatch);
  PyObject *(*tail_call)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *, struct __pyx_obj_5capnp_3lib_5capnp__Request *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__CallContext *__pyx_vtabptr_5capnp_3lib_5capnp__CallContext;


/* "capnp/lib/capnp.pyx":1779
 *         return promise
 * 
 * cdef class _Promise:             # <<<<<<<<<<<<<<
 *     cdef PyPromise * thisptr
 *     cdef public bint is_consumed
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__Promise *, __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init *__pyx_optional_args);
  PyObject *(*wait)(struct __pyx_obj_5capnp_3lib_5capnp__Promise *, int __pyx_skip_dispatch);
  PyObject *(*then)(struct __pyx_obj_5capnp_3lib_5capnp__Promise *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_then *__pyx_optional_args);
  PyObject *(*cancel)(struct __pyx_obj_5capnp_3lib_5capnp__Promise *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_cancel *__pyx_optional_args);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *__pyx_vtabptr_5capnp_3lib_5capnp__Promise;


/* "capnp/lib/capnp.pyx":1852
 * 
 * 
 * cdef class _VoidPromise:             # <<<<<<<<<<<<<<
 *     cdef VoidPromise * thisptr
 *     cdef public bint is_consumed
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise__init *__pyx_optional_args);
  PyObject *(*wait)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, int __pyx_skip_dispatch);
  PyObject *(*then)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_then *__pyx_optional_args);
  PyObject *(*as_pypromise)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, int __pyx_skip_dispatch);
  PyObject *(*cancel)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_cancel *__pyx_optional_args);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise *__pyx_vtabptr_5capnp_3lib_5capnp__VoidPromise;


/* "capnp/lib/capnp.pyx":1919
 *         self.thisptr = NULL
 * 
 * cdef class _RemotePromise:             # <<<<<<<<<<<<<<
 *     cdef RemotePromise * thisptr
 *     cdef public bint is_consumed
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__RemotePromise {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *,  ::capnp::RemotePromise< ::capnp::DynamicStruct>, PyObject *);
  PyObject *(*_wait)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, int __pyx_skip_dispatch);
  PyObject *(*as_pypromise)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, int __pyx_skip_dispatch);
  PyObject *(*then)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_then *__pyx_optional_args);
  PyObject *(*_get)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*cancel)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_cancel *__pyx_optional_args);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__RemotePromise *__pyx_vtabptr_5capnp_3lib_5capnp__RemotePromise;


/* "capnp/lib/capnp.pyx":2056
 *     return _Promise()._init(helpers.then(capnp.joinPromises(heap.finish())))
 * 
 * cdef class _Request(_DynamicStructBuilder):             # <<<<<<<<<<<<<<
 *     cdef Request * thisptr_child
 *     cdef public bint is_consumed
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__Request {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder __pyx_base;
  PyObject *(*_init_child)(struct __pyx_obj_5capnp_3lib_5capnp__Request *,  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct>, PyObject *);
  PyObject *(*send)(struct __pyx_obj_5capnp_3lib_5capnp__Request *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Request *__pyx_vtabptr_5capnp_3lib_5capnp__Request;


/* "capnp/lib/capnp.pyx":2075
 *         return _RemotePromise()._init(self.thisptr_child.send(), self._parent)
 * 
 * cdef class _Response(_DynamicStructReader):             # <<<<<<<<<<<<<<
 *     cdef Response * thisptr_child
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__Response {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader __pyx_base;
  PyObject *(*_init_child)(struct __pyx_obj_5capnp_3lib_5capnp__Response *,  ::capnp::Response< ::capnp::DynamicStruct>, PyObject *);
  PyObject *(*_init_childptr)(struct __pyx_obj_5capnp_3lib_5capnp__Response *,  ::capnp::Response< ::capnp::DynamicStruct> *, PyObject *);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Response *__pyx_vtabptr_5capnp_3lib_5capnp__Response;


/* "capnp/lib/capnp.pyx":2111
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 * cdef class _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *     cdef C_DynamicCapability.Client thisptr
 *     cdef public object _server, _parent, _cached_schema
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *,  ::capnp::DynamicCapability::Client, PyObject *);
  PyObject *(*_init_vals)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, PyObject *);
  PyObject *(*_find_method_args)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_set_fields)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *,  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct> *, PyObject *, PyObject *, PyObject *);
  PyObject *(*_send_helper)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_request_helper)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*upcast)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*cast_as)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicCapabilityClient;


/* "capnp/lib/capnp.pyx":2220
 *         return list(set(self.schema.method_names_inherited) + tuple(dir(self.__class__)))
 * 
 * cdef class _CapabilityClient:             # <<<<<<<<<<<<<<
 *     cdef C_Capability.Client * thisptr
 *     cdef public object _parent
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__CapabilityClient {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *,  ::capnp::Capability::Client, PyObject *);
  PyObject *(*cast_as)(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__CapabilityClient *__pyx_vtabptr_5capnp_3lib_5capnp__CapabilityClient;


/* "capnp/lib/capnp.pyx":2240
 *         return _DynamicCapabilityClient()._init(self.thisptr.castAs(s.thisptr), self._parent)
 * 
 * cdef class _TwoPartyVatNetwork:             # <<<<<<<<<<<<<<
 *     cdef Own[C_TwoPartyVatNetwork] thisptr
 *     cdef _AsyncIoStream stream
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoPartyVatNetwork {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *, struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *,  ::capnp::rpc::twoparty::Side,  ::capnp::ReaderOptions);
  PyObject *(*_init_pipe)(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *, struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *,  ::capnp::rpc::twoparty::Side,  ::capnp::ReaderOptions);
  PyObject *(*on_disconnect)(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_vtabptr_5capnp_3lib_5capnp__TwoPartyVatNetwork;


/* "capnp/lib/capnp.pyx":2256
 *         return _VoidPromise()._init(deref(self.thisptr).onDisconnect(), self)
 * 
 * cdef class TwoPartyClient:             # <<<<<<<<<<<<<<
 *     """
 *     TwoPartyClient for RPC Communication
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyClient {
  PyObject *(*_connect)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*bootstrap)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *, int __pyx_skip_dispatch);
  PyObject *(*on_disconnect)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyClient *__pyx_vtabptr_5capnp_3lib_5capnp_TwoPartyClient;


/* "capnp/lib/capnp.pyx":2352
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())
 * 
 * cdef class TwoPartyServer:             # <<<<<<<<<<<<<<
 *     """
 *     TwoPartyServer for RPC Communication
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyServer {
  PyObject *(*_connect)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*on_disconnect)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *, int __pyx_skip_dispatch);
  PyObject *(*run_forever)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *, int __pyx_skip_dispatch);
  PyObject *(*bootstrap)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyServer *__pyx_vtabptr_5capnp_3lib_5capnp_TwoPartyServer;


/* "capnp/lib/capnp.pyx":2501
 *     cdef Own[AsyncIoStream] thisptr
 * 
 * cdef class _TwoWayPipe:             # <<<<<<<<<<<<<<
 *     cdef _EventLoop _event_loop
 *     cdef TwoWayPipe _pipe
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoWayPipe {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoWayPipe *__pyx_vtabptr_5capnp_3lib_5capnp__TwoWayPipe;


/* "capnp/lib/capnp.pyx":2513
 *         self._pipe = self._event_loop.makeTwoWayPipe()
 * 
 * cdef class _FdAsyncIoStream(_AsyncIoStream):             # <<<<<<<<<<<<<<
 *     cdef _EventLoop _event_loop
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__FdAsyncIoStream {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *, int);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__FdAsyncIoStream *__pyx_vtabptr_5capnp_3lib_5capnp__FdAsyncIoStream;


/* "capnp/lib/capnp.pyx":2527
 *         pass
 * 
 * cdef class PromiseFulfillerPair:             # <<<<<<<<<<<<<<
 *     cdef Own[C_PromiseFulfillerPair] thisptr
 *     cdef public bint is_consumed
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp_PromiseFulfillerPair {
  PyObject *(*fulfill)(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_vtabptr_5capnp_3lib_5capnp_PromiseFulfillerPair;


/* "capnp/lib/capnp.pyx":2565
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 * cdef class _StructSchema:             # <<<<<<<<<<<<<<
 *     cdef C_StructSchema thisptr
 *     cdef object __fieldnames, __union_fields, __non_union_fields, __fields, __getters
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *,  ::capnp::StructSchema);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *__pyx_vtabptr_5capnp_3lib_5capnp__StructSchema;


/* "capnp/lib/capnp.pyx":2682
 *         return '<field schema for %s>' % self.proto.name
 * 
 * cdef class _InterfaceMethod:             # <<<<<<<<<<<<<<
 *     cdef C_InterfaceSchema.Method thisptr
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceMethod {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *,  ::capnp::InterfaceSchema::Method);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceMethod *__pyx_vtabptr_5capnp_3lib_5capnp__InterfaceMethod;


/* "capnp/lib/capnp.pyx":2775
 *         return '<schema for %s>' % self.node.displayName
 * 
 * cdef class _EnumSchema:             # <<<<<<<<<<<<<<
 *     cdef C_EnumSchema thisptr
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__EnumSchema {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *,  ::capnp::EnumSchema);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__EnumSchema *__pyx_vtabptr_5capnp_3lib_5capnp__EnumSchema;


/* "capnp/lib/capnp.pyx":2878
 * types.AnyPointer = _any_pointer
 * 
 * cdef class _ListSchema:             # <<<<<<<<<<<<<<
 *     cdef C_ListSchema thisptr
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__ListSchema {
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *,  ::capnp::ListSchema);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__ListSchema *__pyx_vtabptr_5capnp_3lib_5capnp__ListSchema;


/* "capnp/lib/capnp.pyx":2922
 *             return typeAsSchema(self.thisptr.getElementType())
 * 
 * cdef class _ParsedSchema(_Schema):             # <<<<<<<<<<<<<<
 *     cdef C_ParsedSchema thisptr_child
 *     cdef _init_child(self, C_ParsedSchema other):
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__ParsedSchema {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__Schema __pyx_base;
  PyObject *(*_init_child)(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *,  ::capnp::ParsedSchema);
  PyObject *(*get_nested)(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__ParsedSchema *__pyx_vtabptr_5capnp_3lib_5capnp__ParsedSchema;


/* "capnp/lib/capnp.pyx":3423
 *         return _DynamicOrphan()._init(self.thisptr.newOrphan(s.thisptr), self)
 * 
 * cdef class _MallocMessageBuilder(_MessageBuilder):             # <<<<<<<<<<<<<<
 *     """The main class for building Cap'n Proto messages
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__MallocMessageBuilder {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder __pyx_base;
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__MallocMessageBuilder *__pyx_vtabptr_5capnp_3lib_5capnp__MallocMessageBuilder;


/* "capnp/lib/capnp.pyx":3444
 *             self.thisptr = new schema_cpp.MallocMessageBuilder(size)
 * 
 * cdef class _MessageReader:             # <<<<<<<<<<<<<<
 *     """An abstract base class for reading Cap'n Proto messages
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader {
  PyObject *(*get_root)(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_root_as_any)(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader *__pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;


/* "capnp/lib/capnp.pyx":3489
 *         return _DynamicObjectReader()._init(self.thisptr.getRootAnyPointer(), self)
 * 
 * cdef class _StreamFdMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     """Read a Cap'n Proto message from a file descriptor
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__StreamFdMessageReader {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader __pyx_base;
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__StreamFdMessageReader *__pyx_vtabptr_5capnp_3lib_5capnp__StreamFdMessageReader;


/* "capnp/lib/capnp.pyx":3511
 * 
 * 
 * cdef class _PackedMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     """Read a Cap'n Proto message from a file descriptor in a packed manner
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedMessageReader {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader __pyx_base;
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *,  ::kj::BufferedInputStream &, struct __pyx_opt_args_5capnp_3lib_5capnp_20_PackedMessageReader__init *__pyx_optional_args);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedMessageReader *__pyx_vtabptr_5capnp_3lib_5capnp__PackedMessageReader;


/* "capnp/lib/capnp.pyx":3537
 * 
 * 
 * cdef class _PackedMessageReaderBytes(_MessageReader):             # <<<<<<<<<<<<<<
 *     cdef schema_cpp.ArrayInputStream * stream
 *     cdef Py_buffer view
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedMessageReaderBytes {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader __pyx_base;
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedMessageReaderBytes *__pyx_vtabptr_5capnp_3lib_5capnp__PackedMessageReaderBytes;


/* "capnp/lib/capnp.pyx":3558
 *         PyBuffer_Release(&self.view)
 * 
 * cdef class _InputMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     """Read a Cap'n Proto message from a file descriptor in a packed manner
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__InputMessageReader {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader __pyx_base;
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *,  ::kj::BufferedInputStream &, struct __pyx_opt_args_5capnp_3lib_5capnp_19_InputMessageReader__init *__pyx_optional_args);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__InputMessageReader *__pyx_vtabptr_5capnp_3lib_5capnp__InputMessageReader;


/* "capnp/lib/capnp.pyx":3584
 * 
 * 
 * cdef class _PackedFdMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     """Read a Cap'n Proto message from a file descriptor in a packed manner
 * 
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedFdMessageReader {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader __pyx_base;
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedFdMessageReader *__pyx_vtabptr_5capnp_3lib_5capnp__PackedFdMessageReader;


/* "capnp/lib/capnp.pyx":3804
 * 
 * @cython.internal
 * cdef class _FlatArrayMessageReaderAligned(_MessageReader):             # <<<<<<<<<<<<<<
 *     """
 *     Creates a reader based on a contiguous block of memory
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader __pyx_base;
  PyObject *(*_init)(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *, PyObject *, char const *, Py_ssize_t, struct __pyx_opt_args_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init *__pyx_optional_args);
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_vtabptr_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned;


/* "capnp/lib/capnp.pyx":3835
 * 
 * @cython.internal
 * cdef class _FlatArrayMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 *     cdef object _object_to_pin
 *     def __init__(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReader {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader __pyx_base;
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReader *__pyx_vtabptr_5capnp_3lib_5capnp__FlatArrayMessageReader;


/* "capnp/lib/capnp.pyx":3870
 * 
 * @cython.internal
 * cdef class _SegmentArrayMessageReader(_MessageReader):             # <<<<<<<<<<<<<<
 * 
 *     cdef object _objects_to_pin
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__SegmentArrayMessageReader {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader __pyx_base;
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__SegmentArrayMessageReader *__pyx_vtabptr_5capnp_3lib_5capnp__SegmentArrayMessageReader;


/* "capnp/lib/capnp.pyx":3907
 * 
 * @cython.internal
 * cdef class _FlatMessageBuilder(_MessageBuilder):             # <<<<<<<<<<<<<<
 *     cdef object _object_to_pin
 *     cdef Py_buffer view
 */

struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatMessageBuilder {
  struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder __pyx_base;
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatMessageBuilder *__pyx_vtabptr_5capnp_3lib_5capnp__FlatMessageBuilder;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#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)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

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

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

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

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif

/* PyObjectCall.proto */
#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

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallNoArg.proto */
#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

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* GetItemInt.proto */
#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 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);

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

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

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

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#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);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* IncludeStringH.proto */
#include <string.h>

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

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

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

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

/* None.proto */
static CYTHON_INLINE int64_t __Pyx_mod_int64_t(int64_t, int64_t);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

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

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

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

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* CallUnboundCMethod2.proto */
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
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);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Coroutine.proto */
#define __Pyx_Coroutine_USED
static PyTypeObject *__pyx_CoroutineType = 0;
static PyTypeObject *__pyx_CoroutineAwaitType = 0;
#define __Pyx_Coroutine_CheckExact(obj) (Py_TYPE(obj) == __pyx_CoroutineType)
#define __Pyx_Coroutine_Check(obj) __Pyx_Coroutine_CheckExact(obj)
#define __Pyx_CoroutineAwait_CheckExact(obj) (Py_TYPE(obj) == __pyx_CoroutineAwaitType)
#define __Pyx_Coroutine_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_CoroutineType, body, code, closure, name, qualname, module_name)
static int __pyx_Coroutine_init(void);
static PyObject *__Pyx__Coroutine_await(PyObject *coroutine);
typedef struct {
    PyObject_HEAD
    PyObject *coroutine;
} __pyx_CoroutineAwaitObject;
static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, PyObject *arg);
static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args);

/* GetAwaitIter.proto */
static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o);
static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *o);

/* CoroutineYieldFrom.proto */
static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source);

/* ReturnWithStopIteration.proto */
#define __Pyx_ReturnWithStopIteration(value)\
    if (value == Py_None) PyErr_SetNone(PyExc_StopIteration); else __Pyx__ReturnWithStopIteration(value)
static void __Pyx__ReturnWithStopIteration(PyObject* value);

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* MergeKeywords.proto */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping);

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED 1
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;  // used by FusedFunction for copying defaults
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* None.proto */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_RemainderObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2))
#endif

/* None.proto */
static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t, Py_ssize_t);

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* CallNextTpTraverse.proto */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);

/* CallNextTpClear.proto */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);

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

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* PatchInspect.proto */
static PyObject* __Pyx_patch_inspect(PyObject* module);

/* PatchAsyncIO.proto */
static PyObject* __Pyx_patch_asyncio(PyObject* module);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __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);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* None.proto */
#include <new>

/* ArrayAPI.proto */
#ifndef _ARRAYARRAY_H
#define _ARRAYARRAY_H
typedef struct arraydescr {
    int typecode;
    int itemsize;
    PyObject * (*getitem)(struct arrayobject *, Py_ssize_t);
    int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *);
#if PY_MAJOR_VERSION >= 3
    char *formats;
#endif
} arraydescr;
struct arrayobject {
    PyObject_HEAD
    Py_ssize_t ob_size;
    union {
        char *ob_item;
        float *as_floats;
        double *as_doubles;
        int *as_ints;
        unsigned int *as_uints;
        unsigned char *as_uchars;
        signed char *as_schars;
        char *as_chars;
        unsigned long *as_ulongs;
        long *as_longs;
#if PY_MAJOR_VERSION >= 3
        unsigned long long *as_ulonglongs;
        long long *as_longlongs;
#endif
        short *as_shorts;
        unsigned short *as_ushorts;
        Py_UNICODE *as_pyunicodes;
        void *as_voidptr;
    } data;
    Py_ssize_t allocated;
    struct arraydescr *ob_descr;
    PyObject *weakreflist;
#if PY_MAJOR_VERSION >= 3
        int ob_exports;
#endif
};
#ifndef NO_NEWARRAY_INLINE
static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
    struct arraydescr *descr) {
    arrayobject *op;
    size_t nbytes;
    if (size < 0) {
        PyErr_BadInternalCall();
        return NULL;
    }
    nbytes = size * descr->itemsize;
    if (nbytes / descr->itemsize != (size_t)size) {
        return PyErr_NoMemory();
    }
    op = (arrayobject *) type->tp_alloc(type, 0);
    if (op == NULL) {
        return NULL;
    }
    op->ob_descr = descr;
    op->allocated = size;
    op->weakreflist = NULL;
    op->ob_size = size;
    if (size <= 0) {
        op->data.ob_item = NULL;
    }
    else {
        op->data.ob_item = PyMem_NEW(char, nbytes);
        if (op->data.ob_item == NULL) {
            Py_DECREF(op);
            return PyErr_NoMemory();
        }
    }
    return (PyObject *) op;
}
#else
PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size,
    struct arraydescr *descr);
#endif
static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) {
    void *items = (void*) self->data.ob_item;
    PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize));
    if (items == NULL) {
        PyErr_NoMemory();
        return -1;
    }
    self->data.ob_item = (char*) items;
    self->ob_size = n;
    self->allocated = n;
    return 0;
}
static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) {
    void *items = (void*) self->data.ob_item;
    Py_ssize_t newsize;
    if (n < self->allocated && n*4 > self->allocated) {
        self->ob_size = n;
        return 0;
    }
    newsize = n + (n / 2) + 1;
    if (newsize <= n) {
        PyErr_NoMemory();
        return -1;
    }
    PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize));
    if (items == NULL) {
        PyErr_NoMemory();
        return -1;
    }
    self->data.ob_item = (char*) items;
    self->ob_size = n;
    self->allocated = newsize;
    return 0;
}
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *);

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

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

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

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

static PyObject *__pyx_f_5capnp_3lib_5capnp_19_KjExceptionWrapper__init(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self,  ::kj::Exception &__pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_11_NodeReader_init(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self,  ::capnp::schema::Node::Reader __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_17_NestedNodeReader_init(struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__pyx_v_self,  ::capnp::schema::Node::NestedNode::Reader __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_18_DynamicListReader__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self,  ::capnp::DynamicList::Reader __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_18_DynamicListReader__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, int64_t __pyx_v_index, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_add(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_index, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self,  ::capnp::DynamicList::Builder __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, int64_t __pyx_v_index, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_adopt(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_disown(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_size, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_23_List_NestedNode_Reader__init(struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_v_self,  ::capnp::List< ::capnp::schema::Node::NestedNode> ::Reader __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_DynamicEnum__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self,  ::capnp::DynamicEnum __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_DynamicEnum__as_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_17_DynamicEnumField__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self, PyObject *__pyx_v_proto); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_17_DynamicEnumField__str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self,  ::capnp::DynamicStruct::Reader __pyx_v_other, PyObject *__pyx_v_parent, struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader__init *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__get_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__has(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__has_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__which_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__which(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self,  ::capnp::DynamicStruct::Builder __pyx_v_other, PyObject *__pyx_v_parent, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__check_write(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_bytes(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_segments(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__to_bytes_packed_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_word_count, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_bytes_packed(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__get_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__set_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__has(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__has_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_init *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_init_resizable_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__which_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__which(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_adopt(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_disown(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_as_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_22_DynamicStructPipeline__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self,  ::capnp::DynamicStruct::Pipeline *__pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_22_DynamicStructPipeline__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self,  ::capnp::Orphan< ::capnp::DynamicValue> __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static  ::capnp::Orphan< ::capnp::DynamicValue> __pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan_move(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self,  ::capnp::AnyPointer::Reader __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_struct(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_interface(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self,  ::capnp::AnyPointer::Builder __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_struct(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_interface(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_set_as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_text, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_init_as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_size, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_10_EventLoop__init(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_10_EventLoop__remove(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static  ::kj::TwoWayPipe __pyx_f_5capnp_3lib_5capnp_10_EventLoop_makeTwoWayPipe(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self); /* proto*/
static  ::kj::Own< ::kj::AsyncIoStream>  __pyx_f_5capnp_3lib_5capnp_10_EventLoop_wrapSocketFd(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self, int __pyx_v_fd); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_6_Timer__init(struct __pyx_obj_5capnp_3lib_5capnp__Timer *__pyx_v_self,  ::kj::Timer *__pyx_v_timer); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_6_Timer_after_delay(struct __pyx_obj_5capnp_3lib_5capnp__Timer *__pyx_v_self, PyObject *__pyx_v_time, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext__init(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self,  ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct> __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext__get_results(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_CallContext__get_results *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext_release_params(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext_allow_cancellation(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext_tail_call(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_tailRequest, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Promise__init(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise __pyx_v_other, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Promise_wait(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Promise_then(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_func, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_then *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Promise_cancel(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_cancel *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise__init(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise __pyx_v_other, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise__init *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_wait(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_then(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_func, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_then *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_as_pypromise(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_cancel(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_cancel *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise__init(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self,  ::capnp::RemotePromise< ::capnp::DynamicStruct> __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise__wait(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise_as_pypromise(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise_then(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_func, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_then *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise__get(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise_cancel(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_cancel *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Request__init_child(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self,  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct> __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Request_send(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_9_Response__init_child(struct __pyx_obj_5capnp_3lib_5capnp__Response *__pyx_v_self,  ::capnp::Response< ::capnp::DynamicStruct> __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_9_Response__init_childptr(struct __pyx_obj_5capnp_3lib_5capnp__Response *__pyx_v_self,  ::capnp::Response< ::capnp::DynamicStruct> *__pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self,  ::capnp::DynamicCapability::Client __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__init_vals(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_server); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__find_method_args(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_method_name, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__set_fields(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self,  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct> *__pyx_v_request, PyObject *__pyx_v_name, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__send_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_word_count, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__request_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_firstSegmentWordSize, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient_upcast(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient_cast_as(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_17_CapabilityClient__init(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self,  ::capnp::Capability::Client __pyx_v_other, PyObject *__pyx_v_parent); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_17_CapabilityClient_cast_as(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork__init(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *__pyx_v_stream,  ::capnp::rpc::twoparty::Side __pyx_v_side,  ::capnp::ReaderOptions __pyx_v_opts); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork__init_pipe(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_pipe,  ::capnp::rpc::twoparty::Side __pyx_v_side,  ::capnp::ReaderOptions __pyx_v_opts); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyClient__connect(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_host_string, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyClient_bootstrap(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyClient_on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer__connect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_host_string, PyObject *__pyx_v_bootstrap, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_run_forever(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_bootstrap(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_11_TwoWayPipe__init(struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_16_FdAsyncIoStream__init(struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *__pyx_v_self, int __pyx_v_fd); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20PromiseFulfillerPair_fulfill(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema__init(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self,  ::capnp::Schema __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_as_const_value(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_as_struct(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_as_interface(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_as_enum(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_get_proto(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_13_StructSchema__init(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self,  ::capnp::StructSchema __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_18_StructSchemaField__init(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_self,  ::capnp::StructSchema::Field __pyx_v_other, struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_16_InterfaceMethod__init(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__pyx_v_self,  ::capnp::InterfaceSchema::Method __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_16_InterfaceSchema__init(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self,  ::capnp::InterfaceSchema __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_11_EnumSchema__init(struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__pyx_v_self,  ::capnp::EnumSchema __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_11_ListSchema__init(struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_self,  ::capnp::ListSchema __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_13_ParsedSchema__init_child(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_self,  ::capnp::ParsedSchema __pyx_v_other); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_13_ParsedSchema_get_nested(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_self, PyObject *__pyx_v_name, int __pyx_skip_dispatch); /* proto*/
static  ::kj::ArrayPtr< ::kj::StringPtr>  __pyx_f_5capnp_3lib_5capnp_15_StringArrayPtr_asArrayPtr(struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12SchemaParser__parse_disk_file(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, PyObject *__pyx_v_displayName, PyObject *__pyx_v_diskPath, PyObject *__pyx_v_imports, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_init_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_root_as_any(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_set_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_segments_for_output(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_new_orphan(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_MessageReader_get_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_MessageReader_get_root_as_any(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_PackedMessageReader__init(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__pyx_v_self,  ::kj::BufferedInputStream &__pyx_v_stream, struct __pyx_opt_args_5capnp_3lib_5capnp_20_PackedMessageReader__init *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_InputMessageReader__init(struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__pyx_v_self,  ::kj::BufferedInputStream &__pyx_v_stream, struct __pyx_opt_args_5capnp_3lib_5capnp_19_InputMessageReader__init *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_self, PyObject *__pyx_v_buf, char const *__pyx_v_ptr, Py_ssize_t __pyx_v_sz, struct __pyx_opt_args_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init *__pyx_optional_args); /* proto*/

/* Module declarations from 'capnp.includes' */

/* Module declarations from 'libcpp' */

/* 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 'capnp.helpers.non_circular' */

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

/* Module declarations from 'capnp.includes.types' */

/* Module declarations from 'capnp.includes.schema_cpp' */

/* Module declarations from 'capnp.includes.capnp_cpp' */
static CYTHON_INLINE  ::kj::Duration __pyx_f_5capnp_8includes_9capnp_cpp_Nanoseconds(int64_t); /*proto*/

/* Module declarations from 'capnp.helpers' */

/* Module declarations from 'capnp.helpers.helpers' */

/* Module declarations from 'cython' */

/* Module declarations from 'array' */

/* Module declarations from 'cpython.array' */
static PyTypeObject *__pyx_ptype_7cpython_5array_array = 0;
static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/

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

/* Module declarations from 'capnp.lib.capnp' */
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__StructSchemaField = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__StringArrayPtr = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp_SchemaParser = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicOrphan = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicEnumField = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__Schema = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicEnum = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__MessageBuilder = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__KjExceptionWrapper = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__NodeReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__NestedNodeReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicListReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicResizableListBuilder = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__List_NestedNode_Reader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__MessageSize = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicStructPipeline = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__EventLoop = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__Timer = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__CallContext = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__Promise = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__VoidPromise = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__RemotePromise = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__Request = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__Response = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__CapabilityClient = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp_TwoPartyClient = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp_TwoPartyServer = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__TwoWayPipe = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__FdAsyncIoStream = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp_PyAsyncIoStream = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp_PromiseFulfillerPair = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__StructSchema = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__InterfaceMethod = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__EnumSchema = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__SchemaType = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__ListSchema = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__ParsedSchema = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__MallocMessageBuilder = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__MessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__StreamFdMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__PackedMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__PackedMessageReaderBytes = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__InputMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__PackedFdMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__MultipleMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__MultiplePackedMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__MultipleBytesMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__AlignedBuffer = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__BufferView = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__FlatArrayMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__SegmentArrayMessageReader = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp__FlatMessageBuilder = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct___make_enum = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_3_read = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_4_read = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_5_write = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr = 0;
static PyTypeObject *__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_17_load = 0;
static PyObject *__pyx_v_5capnp_3lib_5capnp__type_registry = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__void = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__bool = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__int8 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__int16 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__int32 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__int64 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__uint8 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__uint16 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__uint32 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__uint64 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__float32 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__float64 = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__text = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__data = 0;
static struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_5capnp_3lib_5capnp__any_pointer = 0;
static PyObject *__pyx_8genexpr2__pyx_v_5capnp_3lib_5capnp_11KjException_x;
static PyObject *__pyx_f_5capnp_3lib_5capnp_to_python_reader( ::capnp::DynamicValue::Reader, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_to_python_builder( ::capnp::DynamicValue::Builder, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp__to_dict(PyObject *, int, int); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp__from_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp__from_tuple(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp__setDynamicFieldWithField( ::capnp::DynamicStruct::Builder, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_wrap_dynamic_struct_reader( ::capnp::Response< ::capnp::DynamicStruct> &); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_wrap_remote_call(PyObject *,  ::capnp::Response< ::capnp::DynamicStruct> &); /*proto*/
static  ::kj::Promise<void>  *__pyx_f_5capnp_3lib_5capnp_call_server_method(PyObject *, char *,  ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct> &); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_convert_array_pyobject( ::kj::Array<PyObject *> &); /*proto*/
static  ::kj::Promise<PyObject *>  *__pyx_f_5capnp_3lib_5capnp_extract_promise(PyObject *); /*proto*/
static  ::capnp::RemotePromise< ::capnp::DynamicStruct> *__pyx_f_5capnp_3lib_5capnp_extract_remote_promise(PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_wrap_kj_exception( ::kj::Exception &); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_wrap_kj_exception_for_reraise( ::kj::Exception &); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_get_exception_info(PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp__find_field_order(PyObject *); /*proto*/
static  ::capnp::ReaderOptions __pyx_f_5capnp_3lib_5capnp_make_reader_opts(PyObject *, PyObject *); /*proto*/
static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_builder(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *); /*proto*/
static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *); /*proto*/
static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_client(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *); /*proto*/
static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_server(PyObject *); /*proto*/
static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_enum(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *); /*proto*/
static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_any_pointer(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *); /*proto*/
static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_any_pointer_builder(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp__setBytesField( ::capnp::DynamicStruct::Builder, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp__setBaseStringField( ::capnp::DynamicStruct::Builder, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, PyObject *); /*proto*/
static struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER(void); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_remove_event_loop(int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_remove_event_loop *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_create_event_loop(int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_create_event_loop *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_reset_event_loop(int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_reset_event_loop *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_join_promises(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_typeAsSchema( ::capnp::Type); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp__new_message(PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicResizableListBuilder__set_state(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *, PyObject *); /*proto*/
static PyObject *__pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setBytes( ::capnp::DynamicList::Builder, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setBytes( ::capnp::DynamicStruct::Builder, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setBaseString( ::capnp::DynamicList::Builder, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setBaseString( ::capnp::DynamicStruct::Builder, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setDynamicField( ::capnp::DynamicList::Builder, PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setDynamicField( ::capnp::DynamicStruct::Builder, PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicEnumField__set_state(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__MessageSize__set_state(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicCapabilityServer__set_state(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *, PyObject *); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__MultipleBytesMessageReader__set_state(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "capnp.lib.capnp"
extern int __pyx_module_is_main_capnp__lib__capnp;
int __pyx_module_is_main_capnp__lib__capnp = 0;

/* Implementation of 'capnp.lib.capnp' */
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_UserWarning;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_xrange;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_MemoryError;
static const char __pyx_k_b[] = "b";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_w[] = "w";
static const char __pyx_k__3[] = ":";
static const char __pyx_k__4[] = "";
static const char __pyx_k_fd[] = "fd";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_os[] = "_os";
static const char __pyx_k_rb[] = "rb";
static const char __pyx_k_EOF[] = "EOF";
static const char __pyx_k_add[] = "add";
static const char __pyx_k_buf[] = "buf";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_get[] = "_get";
static const char __pyx_k_has[] = "_has";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_ret[] = "ret";
static const char __pyx_k_sep[] = "sep";
static const char __pyx_k_set[] = "_set";
static const char __pyx_k_str[] = "_str";
static const char __pyx_k_sys[] = "_sys";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_Bool[] = "Bool";
static const char __pyx_k_Data[] = "Data";
static const char __pyx_k_Int8[] = "Int8";
static const char __pyx_k_PyPy[] = "PyPy";
static const char __pyx_k_Text[] = "Text";
static const char __pyx_k_Type[] = "_Type";
static const char __pyx_k_Void[] = "Void";
static const char __pyx_k__133[] = ".";
static const char __pyx_k__134[] = "_";
static const char __pyx_k__135[] = "-";
static const char __pyx_k__137[] = " ";
static const char __pyx_k__140[] = "..";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_base[] = "__base__";
static const char __pyx_k_call[] = "__call__";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_init[] = "init";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_line[] = "line";
static const char __pyx_k_load[] = "_load";
static const char __pyx_k_loop[] = "loop";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_node[] = "node";
static const char __pyx_k_os_2[] = "os";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_pipe[] = "pipe";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_then[] = "then";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_unix[] = "unix:";
static const char __pyx_k_wait[] = "wait";
static const char __pyx_k_warn[] = "warn";
static const char __pyx_k_Int16[] = "Int16";
static const char __pyx_k_Int32[] = "Int32";
static const char __pyx_k_Int64[] = "Int64";
static const char __pyx_k_OTHER[] = "OTHER";
static const char __pyx_k_Timer[] = "_Timer";
static const char __pyx_k_UInt8[] = "UInt8";
static const char __pyx_k_adopt[] = "adopt";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_await[] = "__await__";
static const char __pyx_k_capnp[] = ".capnp";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_enums[] = "enums";
static const char __pyx_k_field[] = "field";
static const char __pyx_k_get_2[] = "get";
static const char __pyx_k_group[] = "group";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_isabs[] = "isabs";
static const char __pyx_k_isdir[] = "isdir";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_klass[] = "klass";
static const char __pyx_k_local[] = "local";
static const char __pyx_k_named[] = "named";
static const char __pyx_k_other[] = "other";
static const char __pyx_k_paths[] = "paths";
static const char __pyx_k_proto[] = "proto";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_set_2[] = "set";
static const char __pyx_k_sleep[] = "sleep";
static const char __pyx_k_slots[] = "__slots__";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_str_2[] = "__str__";
static const char __pyx_k_sys_2[] = "sys";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_upper[] = "upper";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_which[] = "which";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_FAILED[] = "FAILED";
static const char __pyx_k_Loader[] = "_Loader";
static const char __pyx_k_Reader[] = "Reader";
static const char __pyx_k_Schema[] = "_Schema";
static const char __pyx_k_Server[] = ".Server";
static const char __pyx_k_Type_2[] = "Type";
static const char __pyx_k_UInt16[] = "UInt16";
static const char __pyx_k_UInt32[] = "UInt32";
static const char __pyx_k_UInt64[] = "UInt64";
static const char __pyx_k_a_wait[] = "a_wait";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_as_str[] = "_as_str";
static const char __pyx_k_cancel[] = "cancel";
static const char __pyx_k_decref[] = "_decref";
static const char __pyx_k_disown[] = "disown";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_f_code[] = "f_code";
static const char __pyx_k_fdopen[] = "fdopen";
static const char __pyx_k_fields[] = "fields";
static const char __pyx_k_file_2[] = "__file__";
static const char __pyx_k_fileno[] = "fileno";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_getcwd[] = "getcwd";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_init_2[] = "_init";
static const char __pyx_k_init_3[] = "__init__";
static const char __pyx_k_isEnum[] = "isEnum";
static const char __pyx_k_is_abs[] = "is_abs";
static const char __pyx_k_isfile[] = "isfile";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_load_2[] = "load";
static const char __pyx_k_module[] = "module";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_nature[] = "nature";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_orphan[] = "orphan";
static const char __pyx_k_params[] = "params";
static const char __pyx_k_parent[] = "parent";
static const char __pyx_k_parser[] = "_parser";
static const char __pyx_k_path_2[] = "__path__";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_random[] = "random";
static const char __pyx_k_reader[] = "reader";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_remove[] = "_remove";
static const char __pyx_k_s_enum[] = "<%s enum>";
static const char __pyx_k_schema[] = "schema";
static const char __pyx_k_send_2[] = "_send";
static const char __pyx_k_server[] = "server";
static const char __pyx_k_socket[] = "socket";
static const char __pyx_k_sorted[] = "sorted";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_type_2[] = "_type";
static const char __pyx_k_upcast[] = "upcast";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_wait_2[] = "_wait";
static const char __pyx_k_writer[] = "writer";
static const char __pyx_k_xrange[] = "xrange";
static const char __pyx_k_AF_UNIX[] = "AF_UNIX";
static const char __pyx_k_Builder[] = "Builder";
static const char __pyx_k_Float32[] = "Float32";
static const char __pyx_k_Float64[] = "Float64";
static const char __pyx_k_IOError[] = "IOError";
static const char __pyx_k_Promise[] = "_Promise";
static const char __pyx_k_Request[] = "_Request";
static const char __pyx_k_abspath[] = "abspath";
static const char __pyx_k_as_enum[] = "as_enum";
static const char __pyx_k_as_list[] = "as_list";
static const char __pyx_k_as_text[] = "as_text";
static const char __pyx_k_asyncio[] = "asyncio";
static const char __pyx_k_builder[] = "builder";
static const char __pyx_k_capnp_2[] = "_capnp";
static const char __pyx_k_cast_as[] = "cast_as";
static const char __pyx_k_connect[] = "_connect";
static const char __pyx_k_context[] = "_context";
static const char __pyx_k_dirname[] = "dirname";
static const char __pyx_k_fulfill[] = "fulfill";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_imports[] = "imports";
static const char __pyx_k_inspect[] = "_inspect";
static const char __pyx_k_isConst[] = "isConst";
static const char __pyx_k_is_file[] = "is_file";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_modules[] = "modules";
static const char __pyx_k_ordered[] = "ordered";
static const char __pyx_k_partial[] = "_partial";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_request[] = "_request";
static const char __pyx_k_results[] = "results";
static const char __pyx_k_reverse[] = "reverse";
static const char __pyx_k_scopeId[] = "scopeId";
static const char __pyx_k_to_dict[] = "to_dict";
static const char __pyx_k_verbose[] = "verbose";
static const char __pyx_k_which_2[] = "_which";
static const char __pyx_k_wrapper[] = "wrapper";
static const char __pyx_k_Importer[] = "_Importer";
static const char __pyx_k_Response[] = "_Response";
static const char __pyx_k_Server_2[] = "Server";
static const char __pyx_k_basename[] = "basename";
static const char __pyx_k_defaults[] = "defaults";
static const char __pyx_k_dir_name[] = "dir_name";
static const char __pyx_k_diskPath[] = "diskPath";
static const char __pyx_k_endswith[] = "endswith";
static const char __pyx_k_exc_info[] = "exc_info";
static const char __pyx_k_fullname[] = "fullname";
static const char __pyx_k_getTimer[] = "getTimer";
static const char __pyx_k_get_root[] = "get_root";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_importer[] = "_importer";
static const char __pyx_k_isStruct[] = "isStruct";
static const char __pyx_k_module_2[] = "__module__";
static const char __pyx_k_operator[] = "operator";
static const char __pyx_k_parent_2[] = "_parent";
static const char __pyx_k_property[] = "property";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_random_2[] = "_random";
static const char __pyx_k_remove_2[] = "remove";
static const char __pyx_k_schema_2[] = "_schema";
static const char __pyx_k_segments[] = "segments";
static const char __pyx_k_set_root[] = "set_root";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_socket_2[] = "_socket";
static const char __pyx_k_tb_frame[] = "tb_frame";
static const char __pyx_k_threaded[] = "threaded";
static const char __pyx_k_to_bytes[] = "to_bytes";
static const char __pyx_k_warnings[] = "_warnings";
static const char __pyx_k_EventLoop[] = "_EventLoop";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_as_reader[] = "as_reader";
static const char __pyx_k_as_struct[] = "as_struct";
static const char __pyx_k_bootstrap[] = "bootstrap";
static const char __pyx_k_cap_count[] = "cap_count";
static const char __pyx_k_codeOrder[] = "codeOrder";
static const char __pyx_k_connect_2[] = "connect";
static const char __pyx_k_enum_name[] = "enum_name";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_extension[] = "extension";
static const char __pyx_k_file_name[] = "file_name";
static const char __pyx_k_from_dict[] = "from_dict";
static const char __pyx_k_functools[] = "functools";
static const char __pyx_k_get_proto[] = "get_proto";
static const char __pyx_k_init_root[] = "init_root";
static const char __pyx_k_inspect_2[] = "inspect";
static const char __pyx_k_iteritems[] = "iteritems";
static const char __pyx_k_join_path[] = "join_path";
static const char __pyx_k_make_enum[] = "_make_enum";
static const char __pyx_k_meta_path[] = "meta_path";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_mod_parts[] = "mod_parts";
static const char __pyx_k_nodeProto[] = "_nodeProto";
static const char __pyx_k_partial_2[] = "partial";
static const char __pyx_k_poll_once[] = "poll_once";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_raw_field[] = "raw_field";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_schema_id[] = "schema_id";
static const char __pyx_k_skip_copy[] = "skip_copy";
static const char __pyx_k_tail_call[] = "tail_call";
static const char __pyx_k_tb_lineno[] = "tb_lineno";
static const char __pyx_k_threading[] = "_threading";
static const char __pyx_k_to_python[] = "_to_python";
static const char __pyx_k_traceback[] = "traceback";
static const char __pyx_k_which_str[] = "_which_str";
static const char __pyx_k_AnyPointer[] = "AnyPointer";
static const char __pyx_k_EnumModule[] = "_EnumModule";
static const char __pyx_k_EnumSchema[] = "_EnumSchema";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_ListSchema[] = "_ListSchema";
static const char __pyx_k_ModuleType[] = "_ModuleType";
static const char __pyx_k_NodeReader[] = "_NodeReader";
static const char __pyx_k_OVERLOADED[] = "OVERLOADED";
static const char __pyx_k_SchemaType[] = "_SchemaType";
static const char __pyx_k_TwoWayPipe[] = "_TwoWayPipe";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_as_builder[] = "as_builder";
static const char __pyx_k_attrgetter[] = "_attrgetter";
static const char __pyx_k_durability[] = "durability";
static const char __pyx_k_enumerants[] = "enumerants";
static const char __pyx_k_error_func[] = "error_func";
static const char __pyx_k_fieldnames[] = "fieldnames";
static const char __pyx_k_from_bytes[] = "from_bytes";
static const char __pyx_k_get_nested[] = "get_nested";
static const char __pyx_k_new_client[] = "_new_client";
static const char __pyx_k_new_orphan[] = "new_orphan";
static const char __pyx_k_new_server[] = "_new_server";
static const char __pyx_k_nodeSchema[] = "nodeSchema";
static const char __pyx_k_numParents[] = "numParents";
static const char __pyx_k_param_type[] = "param_type";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_raw_schema[] = "raw_schema";
static const char __pyx_k_s_reader_s[] = "<%s reader %s>";
static const char __pyx_k_sequential[] = "sequential";
static const char __pyx_k_setsockopt[] = "setsockopt";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_sub_module[] = "sub_module";
static const char __pyx_k_subversion[] = "subversion";
static const char __pyx_k_total_size[] = "total_size";
static const char __pyx_k_warnings_2[] = "warnings";
static const char __pyx_k_word_count[] = "word_count";
static const char __pyx_k_CallContext[] = "_CallContext";
static const char __pyx_k_DynamicEnum[] = "_DynamicEnum";
static const char __pyx_k_IPPROTO_TCP[] = "IPPROTO_TCP";
static const char __pyx_k_KjException[] = "KjException";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_MessageSize[] = "_MessageSize";
static const char __pyx_k_OrderedDict[] = "OrderedDict";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_SOCK_STREAM[] = "SOCK_STREAM";
static const char __pyx_k_TCP_NODELAY[] = "TCP_NODELAY";
static const char __pyx_k_UserWarning[] = "UserWarning";
static const char __pyx_k_VoidPromise[] = "_VoidPromise";
static const char __pyx_k_after_delay[] = "after_delay";
static const char __pyx_k_capnp_types[] = "capnp.types";
static const char __pyx_k_co_filename[] = "co_filename";
static const char __pyx_k_collections[] = "_collections";
static const char __pyx_k_description[] = "description";
static const char __pyx_k_displayName[] = "displayName";
static const char __pyx_k_extra_paths[] = "extra_paths";
static const char __pyx_k_fields_list[] = "fields_list";
static const char __pyx_k_find_module[] = "find_module";
static const char __pyx_k_get_results[] = "_get_results";
static const char __pyx_k_has_no_such[] = "has no such";
static const char __pyx_k_host_string[] = "host_string";
static const char __pyx_k_isInterface[] = "isInterface";
static const char __pyx_k_is_consumed[] = "is_consumed";
static const char __pyx_k_load_module[] = "load_module";
static const char __pyx_k_module_name[] = "module_name";
static const char __pyx_k_nestedNodes[] = "nestedNodes";
static const char __pyx_k_new_message[] = "new_message";
static const char __pyx_k_nodeProto_2[] = "nodeProto";
static const char __pyx_k_read_packed[] = "read_packed";
static const char __pyx_k_run_forever[] = "run_forever";
static const char __pyx_k_s_builder_s[] = "<%s builder %s>";
static const char __pyx_k_send_helper[] = "_send_helper";
static const char __pyx_k_server_init[] = "server_init";
static const char __pyx_k_server_self[] = "server_self";
static const char __pyx_k_set_as_text[] = "set_as_text";
static const char __pyx_k_threading_2[] = "threading";
static const char __pyx_k_to_segments[] = "to_segments";
static const char __pyx_k_traceback_2[] = "_traceback";
static const char __pyx_k_union_field[] = "union_field";
static const char __pyx_k_usr_include[] = "/usr/include";
static const char __pyx_k_DISCONNECTED[] = "DISCONNECTED";
static const char __pyx_k_ModuleType_2[] = "ModuleType";
static const char __pyx_k_ParsedSchema[] = "_ParsedSchema";
static const char __pyx_k_SchemaParser[] = "SchemaParser";
static const char __pyx_k_StructModule[] = "_StructModule";
static const char __pyx_k_StructSchema[] = "_StructSchema";
static const char __pyx_k_as_interface[] = "as_interface";
static const char __pyx_k_as_pypromise[] = "as_pypromise";
static const char __pyx_k_attrgetter_2[] = "attrgetter";
static const char __pyx_k_display_name[] = "display_name";
static const char __pyx_k_field_schema[] = "field_schema";
static const char __pyx_k_get_by_field[] = "_get_by_field";
static const char __pyx_k_has_by_field[] = "_has_by_field";
static const char __pyx_k_init_as_list[] = "init_as_list";
static const char __pyx_k_local_module[] = "local_module";
static const char __pyx_k_nodeSchema_2[] = "_nodeSchema";
static const char __pyx_k_package_path[] = "package_path";
static const char __pyx_k_poll_forever[] = "poll_forever";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_s_which_enum[] = "<%s which-enum>";
static const char __pyx_k_schema_for_s[] = "<schema for %s>";
static const char __pyx_k_set_by_field[] = "_set_by_field";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_superclasses[] = "superclasses";
static const char __pyx_k_wait_forever[] = "wait_forever";
static const char __pyx_k_AsyncIoStream[] = "_AsyncIoStream";
static const char __pyx_k_CAPNP_VERSION[] = "_CAPNP_VERSION";
static const char __pyx_k_DynamicOrphan[] = "_DynamicOrphan";
static const char __pyx_k_Loader___init[] = "_Loader.__init__";
static const char __pyx_k_MessageReader[] = "_MessageReader";
static const char __pyx_k_Out_of_bounds[] = "Out of bounds";
static const char __pyx_k_RemotePromise[] = "_RemotePromise";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_StructABCMeta[] = "_StructABCMeta";
static const char __pyx_k_UNIMPLEMENTED[] = "UNIMPLEMENTED";
static const char __pyx_k_asyncio_tasks[] = "asyncio.tasks";
static const char __pyx_k_collections_2[] = "collections";
static const char __pyx_k_from_segments[] = "from_segments";
static const char __pyx_k_getsourcefile[] = "getsourcefile";
static const char __pyx_k_ignore_errors[] = "ignore_errors";
static const char __pyx_k_init_by_field[] = "_init_by_field";
static const char __pyx_k_instancecheck[] = "__instancecheck__";
static const char __pyx_k_modules_by_id[] = "modules_by_id";
static const char __pyx_k_nesting_limit[] = "nesting_limit";
static const char __pyx_k_on_disconnect[] = "on_disconnect";
static const char __pyx_k_pickle_helper[] = "pickle_helper";
static const char __pyx_k_read_multiple[] = "read_multiple";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_register_type[] = "register_type";
static const char __pyx_k_type_registry[] = "_type_registry";
static const char __pyx_k_warn_explicit[] = "warn_explicit";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_File_not_found[] = "File not found: ";
static const char __pyx_k_MessageBuilder[] = "_MessageBuilder";
static const char __pyx_k_StringArrayPtr[] = "_StringArrayPtr";
static const char __pyx_k_TwoPartyClient[] = "TwoPartyClient";
static const char __pyx_k_TwoPartyServer[] = "TwoPartyServer";
static const char __pyx_k_as_const_value[] = "as_const_value";
static const char __pyx_k_getfullargspec[] = "getfullargspec";
static const char __pyx_k_getsourcelines[] = "getsourcelines";
static const char __pyx_k_init_capnp_api[] = "_init_capnp_api";
static const char __pyx_k_release_params[] = "release_params";
static const char __pyx_k_request_helper[] = "_request_helper";
static const char __pyx_k_struct_reducer[] = "_struct_reducer";
static const char __pyx_k_FdAsyncIoStream[] = "_FdAsyncIoStream";
static const char __pyx_k_Importer___init[] = "_Importer.__init__";
static const char __pyx_k_InterfaceMethod[] = "_InterfaceMethod";
static const char __pyx_k_InterfaceModule[] = "_InterfaceModule";
static const char __pyx_k_InterfaceSchema[] = "_InterfaceSchema";
static const char __pyx_k_PyAsyncIoStream[] = "PyAsyncIoStream";
static const char __pyx_k_add_import_hook[] = "add_import_hook";
static const char __pyx_k_capnp_lib_capnp[] = "capnp.lib.capnp";
static const char __pyx_k_get_root_as_any[] = "get_root_as_any";
static const char __pyx_k_has_underscores[] = "has_underscores";
static const char __pyx_k_parse_disk_file[] = "_parse_disk_file";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_reverse_mapping[] = "reverse_mapping";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_to_bytes_packed[] = "to_bytes_packed";
static const char __pyx_k_CapabilityClient[] = "_CapabilityClient";
static const char __pyx_k_DynamicEnumField[] = "_DynamicEnumField";
static const char __pyx_k_KjException_file[] = "KjException.file";
static const char __pyx_k_KjException_line[] = "KjException.line";
static const char __pyx_k_KjException_type[] = "KjException.type";
static const char __pyx_k_NestedNodeReader[] = "_NestedNodeReader";
static const char __pyx_k_additional_paths[] = "additional_paths";
static const char __pyx_k_find_method_args[] = "_find_method_args";
static const char __pyx_k_non_union_fields[] = "non_union_fields";
static const char __pyx_k_DynamicListReader[] = "_DynamicListReader";
static const char __pyx_k_EnumModule___init[] = "_EnumModule.__init__";
static const char __pyx_k_KjException___str[] = "KjException.__str__";
static const char __pyx_k_StructModuleWhich[] = "_StructModuleWhich";
static const char __pyx_k_StructModule_read[] = "_StructModule.read";
static const char __pyx_k_StructSchemaField[] = "_StructSchemaField";
static const char __pyx_k_capnp_module_name[] = "capnp_module_name";
static const char __pyx_k_create_connection[] = "create_connection";
static const char __pyx_k_discriminantCount[] = "discriminantCount";
static const char __pyx_k_discriminantValue[] = "discriminantValue";
static const char __pyx_k_from_bytes_packed[] = "from_bytes_packed";
static const char __pyx_k_load_locals__load[] = "load.<locals>._load";
static const char __pyx_k_methods_inherited[] = "methods_inherited";
static const char __pyx_k_usr_include_capnp[] = "/usr/include/capnp";
static const char __pyx_k_usr_local_include[] = "/usr/local/include";
static const char __pyx_k_DynamicListBuilder[] = "_DynamicListBuilder";
static const char __pyx_k_InputMessageReader[] = "_InputMessageReader";
static const char __pyx_k_KjExceptionWrapper[] = "_KjExceptionWrapper";
static const char __pyx_k_KjException___init[] = "KjException.__init__";
static const char __pyx_k_Loader_load_module[] = "_Loader.load_module";
static const char __pyx_k_TwoPartyVatNetwork[] = "_TwoPartyVatNetwork";
static const char __pyx_k_allow_cancellation[] = "allow_cancellation";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_field_schema_for_s[] = "<field schema for %s>";
static const char __pyx_k_remove_import_hook[] = "remove_import_hook";
static const char __pyx_k_CAPNP_VERSION_MAJOR[] = "_CAPNP_VERSION_MAJOR";
static const char __pyx_k_CAPNP_VERSION_MICRO[] = "_CAPNP_VERSION_MICRO";
static const char __pyx_k_CAPNP_VERSION_MINOR[] = "_CAPNP_VERSION_MINOR";
static const char __pyx_k_DynamicObjectReader[] = "_DynamicObjectReader";
static const char __pyx_k_DynamicStructReader[] = "_DynamicStructReader";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_PackedMessageReader[] = "_PackedMessageReader";
static const char __pyx_k_StructModule___call[] = "_StructModule.__call__";
static const char __pyx_k_StructModule___init[] = "_StructModule.__init__";
static const char __pyx_k_TwoPartyClient_read[] = "TwoPartyClient.read";
static const char __pyx_k_TwoPartyServer_read[] = "TwoPartyServer.read";
static const char __pyx_k_Unknown_schema_type[] = "Unknown schema type";
static const char __pyx_k_capnp_lib_capnp_pyx[] = "capnp\\lib\\capnp.pyx";
static const char __pyx_k_capnp_list_reader_s[] = "<capnp list reader %s>";
static const char __pyx_k_init_resizable_list[] = "init_resizable_list";
static const char __pyx_k_read_multiple_bytes[] = "read_multiple_bytes";
static const char __pyx_k_write_message_to_fd[] = "_write_message_to_fd";
static const char __pyx_k_DynamicObjectBuilder[] = "_DynamicObjectBuilder";
static const char __pyx_k_DynamicStructBuilder[] = "_DynamicStructBuilder";
static const char __pyx_k_Importer_find_module[] = "_Importer.find_module";
static const char __pyx_k_MallocMessageBuilder[] = "_MallocMessageBuilder";
static const char __pyx_k_PromiseFulfillerPair[] = "PromiseFulfillerPair";
static const char __pyx_k_RemotePromise_a_wait[] = "_RemotePromise.a_wait";
static const char __pyx_k_TwoPartyServer_write[] = "TwoPartyServer.write";
static const char __pyx_k_capnp_list_builder_s[] = "<capnp list builder %s>";
static const char __pyx_k_deregister_all_types[] = "deregister_all_types";
static const char __pyx_k_firstSegmentWordSize[] = "firstSegmentWordSize";
static const char __pyx_k_global_schema_parser[] = "_global_schema_parser";
static const char __pyx_k_read_multiple_packed[] = "read_multiple_packed";
static const char __pyx_k_DynamicStructPipeline[] = "_DynamicStructPipeline";
static const char __pyx_k_MultipleMessageReader[] = "_MultipleMessageReader";
static const char __pyx_k_PackedFdMessageReader[] = "_PackedFdMessageReader";
static const char __pyx_k_StreamFdMessageReader[] = "_StreamFdMessageReader";
static const char __pyx_k_InterfaceModule___init[] = "_InterfaceModule.__init__";
static const char __pyx_k_KjException__to_python[] = "KjException._to_python";
static const char __pyx_k_List_NestedNode_Reader[] = "_List_NestedNode_Reader";
static const char __pyx_k_Schema_type_is_unknown[] = "Schema type is unknown";
static const char __pyx_k_method_names_inherited[] = "method_names_inherited";
static const char __pyx_k_to_bytes_packed_helper[] = "_to_bytes_packed_helper";
static const char __pyx_k_DynamicCapabilityClient[] = "_DynamicCapabilityClient";
static const char __pyx_k_DynamicCapabilityServer[] = "_DynamicCapabilityServer";
static const char __pyx_k_KjException_description[] = "KjException.description";
static const char __pyx_k_StructModule_from_bytes[] = "_StructModule.from_bytes";
static const char __pyx_k_get_segments_for_output[] = "get_segments_for_output";
static const char __pyx_k_message_to_packed_bytes[] = "_message_to_packed_bytes";
static const char __pyx_k_num_first_segment_words[] = "num_first_segment_words";
static const char __pyx_k_usr_local_include_capnp[] = "/usr/local/include/capnp";
static const char __pyx_k_Method_named_s_not_found[] = "Method named %s not found.";
static const char __pyx_k_PackedMessageReaderBytes[] = "_PackedMessageReaderBytes";
static const char __pyx_k_StructModule_new_message[] = "_StructModule.new_message";
static const char __pyx_k_StructModule_read_packed[] = "_StructModule.read_packed";
static const char __pyx_k_THREAD_LOCAL_EVENT_LOOPS[] = "_THREAD_LOCAL_EVENT_LOOPS";
static const char __pyx_k_capnp_module_name_dashes[] = "capnp_module_name_dashes";
static const char __pyx_k_capnp_module_name_spaces[] = "capnp_module_name_spaces";
static const char __pyx_k_make_enum_locals_genexpr[] = "_make_enum.<locals>.genexpr";
static const char __pyx_k_traversal_limit_in_words[] = "traversal_limit_in_words";
static const char __pyx_k_could_not_get_read_buffer[] = "could not get read buffer";
static const char __pyx_k_pyx_unpickle__MessageSize[] = "__pyx_unpickle__MessageSize";
static const char __pyx_k_C_DEFAULT_EVENT_LOOP_LOCAL[] = "_C_DEFAULT_EVENT_LOOP_LOCAL";
static const char __pyx_k_Method_named_s_not_found_2[] = "Method named %s not found";
static const char __pyx_k_MultipleBytesMessageReader[] = "_MultipleBytesMessageReader";
static const char __pyx_k_StructModule_from_segments[] = "_StructModule.from_segments";
static const char __pyx_k_StructModule_read_multiple[] = "_StructModule.read_multiple";
static const char __pyx_k_read_multiple_bytes_packed[] = "read_multiple_bytes_packed";
static const char __pyx_k_write_packed_message_to_fd[] = "_write_packed_message_to_fd";
static const char __pyx_k_DynamicResizableListBuilder[] = "_DynamicResizableListBuilder";
static const char __pyx_k_InterfaceModule__new_client[] = "_InterfaceModule._new_client";
static const char __pyx_k_InterfaceModule__new_server[] = "_InterfaceModule._new_server";
static const char __pyx_k_MultiplePackedMessageReader[] = "_MultiplePackedMessageReader";
static const char __pyx_k_TwoPartyServer_poll_forever[] = "TwoPartyServer.poll_forever";
static const char __pyx_k_expected_isSetInUnion_field[] = "expected isSetInUnion(field)";
static const char __pyx_k_File_does_not_end_with_capnp[] = "File does not end with .capnp, {}";
static const char __pyx_k_cleanup_global_schema_parser[] = "cleanup_global_schema_parser";
static const char __pyx_k_StructABCMeta___instancecheck[] = "_StructABCMeta.__instancecheck__";
static const char __pyx_k_InterfaceSchema___get___locals[] = "_InterfaceSchema.__get__.<locals>.genexpr";
static const char __pyx_k_StructModule_from_bytes_packed[] = "_StructModule.from_bytes_packed";
static const char __pyx_k_This_is_an_abstract_base_class[] = "This is an abstract base class";
static const char __pyx_k_pyx_unpickle__DynamicCapabilit[] = "__pyx_unpickle__DynamicCapabilityServer";
static const char __pyx_k_pyx_unpickle__DynamicEnumField[] = "__pyx_unpickle__DynamicEnumField";
static const char __pyx_k_pyx_unpickle__DynamicResizable[] = "__pyx_unpickle__DynamicResizableListBuilder";
static const char __pyx_k_pyx_unpickle__MultipleBytesMes[] = "__pyx_unpickle__MultipleBytesMessageReader";
static const char __pyx_k_A_metaclass_for_the_Type_Reader[] = "A metaclass for the Type.Reader and Type.Builder ABCs.";
static const char __pyx_k_An_abstract_base_class_Builders[] = "An abstract base class.  Builders are 'instances' of this class.";
static const char __pyx_k_InterfaceModule___init___locals[] = "_InterfaceModule.__init__.<locals>.server_init";
static const char __pyx_k_KjException_is_a_wrapper_of_the[] = "KjException is a wrapper of the internal C++ exception type. There is an enum named `Type` listed below, and a bunch of fields";
static const char __pyx_k_MultipleBytesPackedMessageReade[] = "_MultipleBytesPackedMessageReader";
static const char __pyx_k_StructModule_read_multiple_byte[] = "_StructModule.read_multiple_bytes";
static const char __pyx_k_StructModule_read_multiple_pack[] = "_StructModule.read_multiple_packed";
static const char __pyx_k_StructSchema___get___locals_gen[] = "_StructSchema.__get__.<locals>.genexpr";
static const char __pyx_k_Too_many_values_returned_from_s[] = "Too many values returned from `%s`. Expected %d and got %d";
static const char __pyx_k_Tried_to_set_field_with_a_value[] = "Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'";
static const char __pyx_k_expected_variable_length_string[] = "expected variable length string object";
static const char __pyx_k_input_length_must_be_a_multiple[] = "input length must be a multiple of eight bytes";
static const char __pyx_k_invalid_module_expected_s_got_s[] = "invalid module, expected %s, got %s";
static const char __pyx_k_load_locals__load_locals_Reader[] = "load.<locals>._load.<locals>.Reader";
static const char __pyx_k_self_thisptr_self_thisptr_child[] = "self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling";
static const char __pyx_k_An_abstract_base_class_Readers_a[] = "An abstract base class.  Readers are 'instances' of this class.";
static const char __pyx_k_Attempted_to_call_which_on_a_non[] = "Attempted to call which on a non-union type";
static const char __pyx_k_Cannot_call_method_s_with_positi[] = "Cannot call method `%s` with positional args, since its param struct is not implicitly defined and thus does not have a set order of arguments";
static const char __pyx_k_Cannot_convert_type_to_Python_Ty[] = "Cannot convert type to Python. Type is unknown by capnproto library";
static const char __pyx_k_Couldn_t_determine_python_except[] = "Couldn't determine python exception";
static const char __pyx_k_Function_passed_to_then_call_mus[] = "Function passed to `then` call must take exactly one argument";
static const char __pyx_k_Incompatible_checksums_s_vs_0x49[] = "Incompatible checksums (%s vs 0x49eb231 = (_field, _list, _message, _parent, _schema))";
static const char __pyx_k_Incompatible_checksums_s_vs_0x54[] = "Incompatible checksums (%s vs 0x54274ab = (schema, server))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xae[] = "Incompatible checksums (%s vs 0xae0c71a = (_object_to_pin, nesting_limit, offset, ptr, schema, sz, traversal_limit_in_words))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xd1[] = "Incompatible checksums (%s vs 0xd1d072f = (cap_count, word_count))";
static const char __pyx_k_Incompatible_checksums_s_vs_0xd6[] = "Incompatible checksums (%s vs 0xd68195b = (thisptr))";
static const char __pyx_k_Invalid_buffer_passed_to_BufferV[] = "Invalid buffer passed to BufferView";
static const char __pyx_k_One_of_the_promises_passed_to_jo[] = "One of the promises passed to `join_promises` had a non promise value of: ";
static const char __pyx_k_Promise_was_already_used_in_a_co[] = "Promise was already used in a consuming operation. You can no longer use this Promise object";
static const char __pyx_k_Request_has_already_been_sent_Yo[] = "Request has already been sent. You can only send a request once.";
static const char __pyx_k_Server_function_s_returned_a_val[] = "Server function (%s) returned a value that was not a Promise: return = %s";
static const char __pyx_k_This_is_an_abstract_base_class_Y[] = "This is an abstract base class. You should use MallocMessageBuilder instead";
static const char __pyx_k_This_message_has_already_been_wr[] = "This message has already been written once. Be very careful that you're not setting Text/Struct/List fields more than once, since that will cause memory leaks (both in memory and in the serialized data). You can disable this warning by calling the `clear_write_flag` method of this object after every write.";
static const char __pyx_k_Too_many_arguments_passed_to_s_E[] = "Too many arguments passed to `%s`. Expected %d and got %d";
static const char __pyx_k_You_can_only_call_write_on_the_m[] = "You can only call write() on the message's root struct.";
static const char __pyx_k_You_must_pass_a_string_as_the_so[] = "You must pass a string as the socket parameter in __init__ to use this function";
static const char __pyx_k_You_must_provide_a_bootstrap_int[] = "You must provide a bootstrap interface to a server constructor.";
static const char __pyx_k_backing_array_was_not_large_enou[] = "backing array was not large enough";
static const char __pyx_k_expected_buffer_like_object_in_F[] = "expected buffer-like object in FlatArrayMessageReader";
static const char __pyx_k_load_locals__load_locals_Builder[] = "load.<locals>._load.<locals>.Builder";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_self__error_handler_self__task_s[] = "self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling";
static const char __pyx_k_self__pipe_cannot_be_converted_t[] = "self._pipe cannot be converted to a Python object for pickling";
static const char __pyx_k_self__seg_ptrs_self_thisptr_self[] = "self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling";
static const char __pyx_k_self_buffered_stream_self_stream[] = "self.buffered_stream,self.stream cannot be converted to a Python object for pickling";
static const char __pyx_k_self_stream_self_thisptr_self_vi[] = "self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling";
static const char __pyx_k_self_thisptr_cannot_be_converted[] = "self.thisptr cannot be converted to a Python object for pickling";
static const char __pyx_k_self_thisptr_self_view_cannot_be[] = "self.thisptr,self.view cannot be converted to a Python object for pickling";
static const char __pyx_k_self_view_cannot_be_converted_to[] = "self.view cannot be converted to a Python object for pickling";
static const char __pyx_k_StructModule_read_multiple_byte_2[] = "_StructModule.read_multiple_bytes_packed";
static const char __pyx_k_load_locals__load_locals_Reader_2[] = "load.<locals>._load.<locals>.Reader.__new__";
static const char __pyx_k_Cannot_convert_type_to_Python_Ty_2[] = "Cannot convert type to Python. Type is unhandled by capnproto library";
static const char __pyx_k_Function_passed_to_then_call_mus_2[] = "Function passed to `then` call must take no arguments";
static const char __pyx_k_Server_function_s_returned_a_val_2[] = "Server function (%s) returned a value that was not a Promise";
static const char __pyx_k_load_locals__load_locals_Builder_2[] = "load.<locals>._load.<locals>.Builder.__new__";
static const char __pyx_k_self_buffered_stream_self_stream_2[] = "self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling";
static PyObject *__pyx_n_s_AF_UNIX;
static PyObject *__pyx_kp_s_A_metaclass_for_the_Type_Reader;
static PyObject *__pyx_kp_s_An_abstract_base_class_Builders;
static PyObject *__pyx_kp_s_An_abstract_base_class_Readers_a;
static PyObject *__pyx_n_s_AnyPointer;
static PyObject *__pyx_n_s_AsyncIoStream;
static PyObject *__pyx_kp_s_Attempted_to_call_which_on_a_non;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_Bool;
static PyObject *__pyx_n_s_Builder;
static PyObject *__pyx_n_s_CAPNP_VERSION;
static PyObject *__pyx_n_s_CAPNP_VERSION_MAJOR;
static PyObject *__pyx_n_s_CAPNP_VERSION_MICRO;
static PyObject *__pyx_n_s_CAPNP_VERSION_MINOR;
static PyObject *__pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL;
static PyObject *__pyx_n_s_CallContext;
static PyObject *__pyx_kp_s_Cannot_call_method_s_with_positi;
static PyObject *__pyx_kp_s_Cannot_convert_type_to_Python_Ty;
static PyObject *__pyx_kp_s_Cannot_convert_type_to_Python_Ty_2;
static PyObject *__pyx_n_s_CapabilityClient;
static PyObject *__pyx_kp_b_Couldn_t_determine_python_except;
static PyObject *__pyx_n_s_DISCONNECTED;
static PyObject *__pyx_n_s_Data;
static PyObject *__pyx_n_s_DynamicCapabilityClient;
static PyObject *__pyx_n_s_DynamicCapabilityServer;
static PyObject *__pyx_n_s_DynamicEnum;
static PyObject *__pyx_n_s_DynamicEnumField;
static PyObject *__pyx_n_s_DynamicListBuilder;
static PyObject *__pyx_n_s_DynamicListReader;
static PyObject *__pyx_n_s_DynamicObjectBuilder;
static PyObject *__pyx_n_s_DynamicObjectReader;
static PyObject *__pyx_n_s_DynamicOrphan;
static PyObject *__pyx_n_s_DynamicResizableListBuilder;
static PyObject *__pyx_n_s_DynamicStructBuilder;
static PyObject *__pyx_n_s_DynamicStructPipeline;
static PyObject *__pyx_n_s_DynamicStructReader;
static PyObject *__pyx_n_s_EOF;
static PyObject *__pyx_n_s_EnumModule;
static PyObject *__pyx_n_s_EnumModule___init;
static PyObject *__pyx_n_s_EnumSchema;
static PyObject *__pyx_n_s_EventLoop;
static PyObject *__pyx_n_s_FAILED;
static PyObject *__pyx_n_s_FdAsyncIoStream;
static PyObject *__pyx_kp_s_File_does_not_end_with_capnp;
static PyObject *__pyx_kp_s_File_not_found;
static PyObject *__pyx_n_s_Float32;
static PyObject *__pyx_n_s_Float64;
static PyObject *__pyx_kp_s_Function_passed_to_then_call_mus;
static PyObject *__pyx_kp_s_Function_passed_to_then_call_mus_2;
static PyObject *__pyx_n_s_IOError;
static PyObject *__pyx_n_s_IPPROTO_TCP;
static PyObject *__pyx_n_s_Importer;
static PyObject *__pyx_n_s_Importer___init;
static PyObject *__pyx_n_s_Importer_find_module;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x49;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x54;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xae;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd1;
static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd6;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_InputMessageReader;
static PyObject *__pyx_n_s_Int16;
static PyObject *__pyx_n_s_Int32;
static PyObject *__pyx_n_s_Int64;
static PyObject *__pyx_n_s_Int8;
static PyObject *__pyx_n_s_InterfaceMethod;
static PyObject *__pyx_n_s_InterfaceModule;
static PyObject *__pyx_n_s_InterfaceModule___init;
static PyObject *__pyx_n_s_InterfaceModule___init___locals;
static PyObject *__pyx_n_s_InterfaceModule__new_client;
static PyObject *__pyx_n_s_InterfaceModule__new_server;
static PyObject *__pyx_n_s_InterfaceSchema;
static PyObject *__pyx_n_s_InterfaceSchema___get___locals;
static PyObject *__pyx_kp_s_Invalid_buffer_passed_to_BufferV;
static PyObject *__pyx_n_s_KjException;
static PyObject *__pyx_n_s_KjExceptionWrapper;
static PyObject *__pyx_n_s_KjException___init;
static PyObject *__pyx_n_s_KjException___str;
static PyObject *__pyx_n_s_KjException__to_python;
static PyObject *__pyx_n_s_KjException_description;
static PyObject *__pyx_n_s_KjException_file;
static PyObject *__pyx_kp_s_KjException_is_a_wrapper_of_the;
static PyObject *__pyx_n_s_KjException_line;
static PyObject *__pyx_n_s_KjException_type;
static PyObject *__pyx_n_s_ListSchema;
static PyObject *__pyx_n_s_List_NestedNode_Reader;
static PyObject *__pyx_n_s_Loader;
static PyObject *__pyx_n_s_Loader___init;
static PyObject *__pyx_n_s_Loader_load_module;
static PyObject *__pyx_n_s_MallocMessageBuilder;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_n_s_MessageBuilder;
static PyObject *__pyx_n_s_MessageReader;
static PyObject *__pyx_n_s_MessageSize;
static PyObject *__pyx_kp_s_Method_named_s_not_found;
static PyObject *__pyx_kp_s_Method_named_s_not_found_2;
static PyObject *__pyx_n_s_ModuleType;
static PyObject *__pyx_n_s_ModuleType_2;
static PyObject *__pyx_n_s_MultipleBytesMessageReader;
static PyObject *__pyx_n_s_MultipleBytesPackedMessageReade;
static PyObject *__pyx_n_s_MultipleMessageReader;
static PyObject *__pyx_n_s_MultiplePackedMessageReader;
static PyObject *__pyx_n_s_NestedNodeReader;
static PyObject *__pyx_n_s_NodeReader;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_OTHER;
static PyObject *__pyx_n_s_OVERLOADED;
static PyObject *__pyx_kp_s_One_of_the_promises_passed_to_jo;
static PyObject *__pyx_n_s_OrderedDict;
static PyObject *__pyx_kp_s_Out_of_bounds;
static PyObject *__pyx_n_s_PackedFdMessageReader;
static PyObject *__pyx_n_s_PackedMessageReader;
static PyObject *__pyx_n_s_PackedMessageReaderBytes;
static PyObject *__pyx_n_s_ParsedSchema;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_n_s_Promise;
static PyObject *__pyx_n_s_PromiseFulfillerPair;
static PyObject *__pyx_kp_s_Promise_was_already_used_in_a_co;
static PyObject *__pyx_n_s_PyAsyncIoStream;
static PyObject *__pyx_n_s_PyPy;
static PyObject *__pyx_n_s_Reader;
static PyObject *__pyx_n_s_RemotePromise;
static PyObject *__pyx_n_s_RemotePromise_a_wait;
static PyObject *__pyx_n_s_Request;
static PyObject *__pyx_kp_s_Request_has_already_been_sent_Yo;
static PyObject *__pyx_n_s_Response;
static PyObject *__pyx_n_s_SOCK_STREAM;
static PyObject *__pyx_n_s_Schema;
static PyObject *__pyx_n_s_SchemaParser;
static PyObject *__pyx_n_s_SchemaType;
static PyObject *__pyx_kp_s_Schema_type_is_unknown;
static PyObject *__pyx_kp_s_Server;
static PyObject *__pyx_n_s_Server_2;
static PyObject *__pyx_kp_s_Server_function_s_returned_a_val;
static PyObject *__pyx_kp_s_Server_function_s_returned_a_val_2;
static PyObject *__pyx_n_s_StopIteration;
static PyObject *__pyx_n_s_StreamFdMessageReader;
static PyObject *__pyx_n_s_StringArrayPtr;
static PyObject *__pyx_n_s_StructABCMeta;
static PyObject *__pyx_n_s_StructABCMeta___instancecheck;
static PyObject *__pyx_n_s_StructModule;
static PyObject *__pyx_n_s_StructModuleWhich;
static PyObject *__pyx_n_s_StructModule___call;
static PyObject *__pyx_n_s_StructModule___init;
static PyObject *__pyx_n_s_StructModule_from_bytes;
static PyObject *__pyx_n_s_StructModule_from_bytes_packed;
static PyObject *__pyx_n_s_StructModule_from_segments;
static PyObject *__pyx_n_s_StructModule_new_message;
static PyObject *__pyx_n_s_StructModule_read;
static PyObject *__pyx_n_s_StructModule_read_multiple;
static PyObject *__pyx_n_s_StructModule_read_multiple_byte;
static PyObject *__pyx_n_s_StructModule_read_multiple_byte_2;
static PyObject *__pyx_n_s_StructModule_read_multiple_pack;
static PyObject *__pyx_n_s_StructModule_read_packed;
static PyObject *__pyx_n_s_StructSchema;
static PyObject *__pyx_n_s_StructSchemaField;
static PyObject *__pyx_n_s_StructSchema___get___locals_gen;
static PyObject *__pyx_n_s_TCP_NODELAY;
static PyObject *__pyx_n_s_THREAD_LOCAL_EVENT_LOOPS;
static PyObject *__pyx_n_s_Text;
static PyObject *__pyx_kp_s_This_is_an_abstract_base_class;
static PyObject *__pyx_kp_s_This_is_an_abstract_base_class_Y;
static PyObject *__pyx_kp_s_This_message_has_already_been_wr;
static PyObject *__pyx_n_s_Timer;
static PyObject *__pyx_kp_s_Too_many_arguments_passed_to_s_E;
static PyObject *__pyx_kp_s_Too_many_values_returned_from_s;
static PyObject *__pyx_kp_s_Tried_to_set_field_with_a_value;
static PyObject *__pyx_n_s_TwoPartyClient;
static PyObject *__pyx_n_s_TwoPartyClient_read;
static PyObject *__pyx_n_s_TwoPartyServer;
static PyObject *__pyx_n_s_TwoPartyServer_poll_forever;
static PyObject *__pyx_n_s_TwoPartyServer_read;
static PyObject *__pyx_n_s_TwoPartyServer_write;
static PyObject *__pyx_n_s_TwoPartyVatNetwork;
static PyObject *__pyx_n_s_TwoWayPipe;
static PyObject *__pyx_n_s_Type;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_Type_2;
static PyObject *__pyx_n_s_UInt16;
static PyObject *__pyx_n_s_UInt32;
static PyObject *__pyx_n_s_UInt64;
static PyObject *__pyx_n_s_UInt8;
static PyObject *__pyx_n_s_UNIMPLEMENTED;
static PyObject *__pyx_kp_s_Unknown_schema_type;
static PyObject *__pyx_n_s_UserWarning;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Void;
static PyObject *__pyx_n_s_VoidPromise;
static PyObject *__pyx_kp_s_You_can_only_call_write_on_the_m;
static PyObject *__pyx_kp_s_You_must_pass_a_string_as_the_so;
static PyObject *__pyx_kp_s_You_must_provide_a_bootstrap_int;
static PyObject *__pyx_kp_s__133;
static PyObject *__pyx_n_s__134;
static PyObject *__pyx_kp_s__135;
static PyObject *__pyx_kp_s__137;
static PyObject *__pyx_kp_s__140;
static PyObject *__pyx_kp_s__3;
static PyObject *__pyx_kp_b__4;
static PyObject *__pyx_kp_s__4;
static PyObject *__pyx_n_s_a_wait;
static PyObject *__pyx_n_s_abspath;
static PyObject *__pyx_n_s_add;
static PyObject *__pyx_n_s_add_import_hook;
static PyObject *__pyx_n_s_additional_paths;
static PyObject *__pyx_n_s_adopt;
static PyObject *__pyx_n_s_after_delay;
static PyObject *__pyx_n_s_allow_cancellation;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_as_builder;
static PyObject *__pyx_n_s_as_const_value;
static PyObject *__pyx_n_s_as_enum;
static PyObject *__pyx_n_s_as_interface;
static PyObject *__pyx_n_s_as_list;
static PyObject *__pyx_n_s_as_pypromise;
static PyObject *__pyx_n_s_as_reader;
static PyObject *__pyx_n_s_as_str;
static PyObject *__pyx_n_s_as_struct;
static PyObject *__pyx_n_s_as_text;
static PyObject *__pyx_n_s_asyncio;
static PyObject *__pyx_n_s_asyncio_coroutines;
static PyObject *__pyx_n_s_asyncio_tasks;
static PyObject *__pyx_n_s_attrgetter;
static PyObject *__pyx_n_s_attrgetter_2;
static PyObject *__pyx_n_s_await;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_kp_s_backing_array_was_not_large_enou;
static PyObject *__pyx_n_s_base;
static PyObject *__pyx_n_s_basename;
static PyObject *__pyx_n_s_bootstrap;
static PyObject *__pyx_n_s_buf;
static PyObject *__pyx_n_s_builder;
static PyObject *__pyx_n_s_call;
static PyObject *__pyx_n_s_cancel;
static PyObject *__pyx_n_s_cap_count;
static PyObject *__pyx_kp_s_capnp;
static PyObject *__pyx_n_s_capnp_2;
static PyObject *__pyx_n_s_capnp_lib_capnp;
static PyObject *__pyx_kp_s_capnp_lib_capnp_pyx;
static PyObject *__pyx_kp_s_capnp_list_builder_s;
static PyObject *__pyx_kp_s_capnp_list_reader_s;
static PyObject *__pyx_n_s_capnp_module_name;
static PyObject *__pyx_n_s_capnp_module_name_dashes;
static PyObject *__pyx_n_s_capnp_module_name_spaces;
static PyObject *__pyx_kp_s_capnp_types;
static PyObject *__pyx_n_s_cast_as;
static PyObject *__pyx_n_s_class;
static PyObject *__pyx_n_s_cleanup_global_schema_parser;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_co_filename;
static PyObject *__pyx_n_s_codeOrder;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_collections_2;
static PyObject *__pyx_n_s_connect;
static PyObject *__pyx_n_s_connect_2;
static PyObject *__pyx_n_s_context;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_kp_s_could_not_get_read_buffer;
static PyObject *__pyx_n_s_create_connection;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_decref;
static PyObject *__pyx_n_s_defaults;
static PyObject *__pyx_n_s_deregister_all_types;
static PyObject *__pyx_n_s_description;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dir_name;
static PyObject *__pyx_n_s_dirname;
static PyObject *__pyx_n_s_discriminantCount;
static PyObject *__pyx_n_s_discriminantValue;
static PyObject *__pyx_n_s_diskPath;
static PyObject *__pyx_n_s_disown;
static PyObject *__pyx_n_s_displayName;
static PyObject *__pyx_n_s_display_name;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_durability;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_endswith;
static PyObject *__pyx_n_s_enum_name;
static PyObject *__pyx_n_s_enumerants;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_enums;
static PyObject *__pyx_n_s_error_func;
static PyObject *__pyx_n_s_exc_info;
static PyObject *__pyx_kp_s_expected_buffer_like_object_in_F;
static PyObject *__pyx_kp_s_expected_isSetInUnion_field;
static PyObject *__pyx_kp_s_expected_variable_length_string;
static PyObject *__pyx_n_s_extension;
static PyObject *__pyx_n_s_extra_paths;
static PyObject *__pyx_n_s_f_code;
static PyObject *__pyx_n_s_fd;
static PyObject *__pyx_n_s_fdopen;
static PyObject *__pyx_n_s_field;
static PyObject *__pyx_n_s_field_schema;
static PyObject *__pyx_kp_s_field_schema_for_s;
static PyObject *__pyx_n_s_fieldnames;
static PyObject *__pyx_n_s_fields;
static PyObject *__pyx_n_s_fields_list;
static PyObject *__pyx_n_s_file;
static PyObject *__pyx_n_s_file_2;
static PyObject *__pyx_n_s_file_name;
static PyObject *__pyx_n_s_fileno;
static PyObject *__pyx_n_s_find_method_args;
static PyObject *__pyx_n_s_find_module;
static PyObject *__pyx_n_s_firstSegmentWordSize;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_from_bytes;
static PyObject *__pyx_n_s_from_bytes_packed;
static PyObject *__pyx_n_s_from_dict;
static PyObject *__pyx_n_s_from_segments;
static PyObject *__pyx_n_s_fulfill;
static PyObject *__pyx_n_s_fullname;
static PyObject *__pyx_n_s_func;
static PyObject *__pyx_n_s_functools;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_getTimer;
static PyObject *__pyx_n_s_get_2;
static PyObject *__pyx_n_s_get_by_field;
static PyObject *__pyx_n_s_get_nested;
static PyObject *__pyx_n_s_get_proto;
static PyObject *__pyx_n_s_get_results;
static PyObject *__pyx_n_s_get_root;
static PyObject *__pyx_n_s_get_root_as_any;
static PyObject *__pyx_n_s_get_segments_for_output;
static PyObject *__pyx_n_s_getcwd;
static PyObject *__pyx_n_s_getfullargspec;
static PyObject *__pyx_n_s_getsourcefile;
static PyObject *__pyx_n_s_getsourcelines;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_global_schema_parser;
static PyObject *__pyx_n_s_group;
static PyObject *__pyx_n_s_has;
static PyObject *__pyx_n_s_has_by_field;
static PyObject *__pyx_kp_s_has_no_such;
static PyObject *__pyx_n_s_has_underscores;
static PyObject *__pyx_n_s_host_string;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_ignore_errors;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_importer;
static PyObject *__pyx_n_s_imports;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_init_2;
static PyObject *__pyx_n_s_init_3;
static PyObject *__pyx_n_s_init_as_list;
static PyObject *__pyx_n_s_init_by_field;
static PyObject *__pyx_n_s_init_capnp_api;
static PyObject *__pyx_n_s_init_resizable_list;
static PyObject *__pyx_n_s_init_root;
static PyObject *__pyx_kp_s_input_length_must_be_a_multiple;
static PyObject *__pyx_n_s_inspect;
static PyObject *__pyx_n_s_inspect_2;
static PyObject *__pyx_n_s_instancecheck;
static PyObject *__pyx_kp_s_invalid_module_expected_s_got_s;
static PyObject *__pyx_n_s_isConst;
static PyObject *__pyx_n_s_isEnum;
static PyObject *__pyx_n_s_isInterface;
static PyObject *__pyx_n_s_isStruct;
static PyObject *__pyx_n_s_is_abs;
static PyObject *__pyx_n_s_is_consumed;
static PyObject *__pyx_n_s_is_file;
static PyObject *__pyx_n_s_isabs;
static PyObject *__pyx_n_s_isdir;
static PyObject *__pyx_n_s_isfile;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iteritems;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_join_path;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_klass;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_line;
static PyObject *__pyx_n_s_load;
static PyObject *__pyx_n_s_load_2;
static PyObject *__pyx_n_s_load_locals__load;
static PyObject *__pyx_n_s_load_locals__load_locals_Builder;
static PyObject *__pyx_n_s_load_locals__load_locals_Builder_2;
static PyObject *__pyx_n_s_load_locals__load_locals_Reader;
static PyObject *__pyx_n_s_load_locals__load_locals_Reader_2;
static PyObject *__pyx_n_s_load_module;
static PyObject *__pyx_n_s_local;
static PyObject *__pyx_n_s_local_module;
static PyObject *__pyx_n_s_loop;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_make_enum;
static PyObject *__pyx_n_s_make_enum_locals_genexpr;
static PyObject *__pyx_n_s_message;
static PyObject *__pyx_n_s_message_to_packed_bytes;
static PyObject *__pyx_n_s_meta_path;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_method_names_inherited;
static PyObject *__pyx_n_s_methods_inherited;
static PyObject *__pyx_n_s_mod_parts;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_module_2;
static PyObject *__pyx_n_s_module_name;
static PyObject *__pyx_n_s_modules;
static PyObject *__pyx_n_s_modules_by_id;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_named;
static PyObject *__pyx_n_s_nature;
static PyObject *__pyx_n_s_nestedNodes;
static PyObject *__pyx_n_s_nesting_limit;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_new_client;
static PyObject *__pyx_n_s_new_message;
static PyObject *__pyx_n_s_new_orphan;
static PyObject *__pyx_n_s_new_server;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_node;
static PyObject *__pyx_n_s_nodeProto;
static PyObject *__pyx_n_s_nodeProto_2;
static PyObject *__pyx_n_s_nodeSchema;
static PyObject *__pyx_n_s_nodeSchema_2;
static PyObject *__pyx_n_s_non_union_fields;
static PyObject *__pyx_n_s_numParents;
static PyObject *__pyx_n_s_num_first_segment_words;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_on_disconnect;
static PyObject *__pyx_n_s_operator;
static PyObject *__pyx_n_s_ordered;
static PyObject *__pyx_n_s_orphan;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_os_2;
static PyObject *__pyx_n_s_other;
static PyObject *__pyx_n_s_package_path;
static PyObject *__pyx_n_s_param_type;
static PyObject *__pyx_n_s_params;
static PyObject *__pyx_n_s_parent;
static PyObject *__pyx_n_s_parent_2;
static PyObject *__pyx_n_s_parse_disk_file;
static PyObject *__pyx_n_s_parser;
static PyObject *__pyx_n_s_partial;
static PyObject *__pyx_n_s_partial_2;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_path_2;
static PyObject *__pyx_n_s_paths;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_n_s_pickle_helper;
static PyObject *__pyx_n_s_pipe;
static PyObject *__pyx_n_s_poll_forever;
static PyObject *__pyx_n_s_poll_once;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_proto;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle__DynamicCapabilit;
static PyObject *__pyx_n_s_pyx_unpickle__DynamicEnumField;
static PyObject *__pyx_n_s_pyx_unpickle__DynamicResizable;
static PyObject *__pyx_n_s_pyx_unpickle__MessageSize;
static PyObject *__pyx_n_s_pyx_unpickle__MultipleBytesMes;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_s_random;
static PyObject *__pyx_n_s_random_2;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_raw_field;
static PyObject *__pyx_n_s_raw_schema;
static PyObject *__pyx_n_s_rb;
static PyObject *__pyx_n_s_read;
static PyObject *__pyx_n_s_read_multiple;
static PyObject *__pyx_n_s_read_multiple_bytes;
static PyObject *__pyx_n_s_read_multiple_bytes_packed;
static PyObject *__pyx_n_s_read_multiple_packed;
static PyObject *__pyx_n_s_read_packed;
static PyObject *__pyx_n_s_reader;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_register_type;
static PyObject *__pyx_n_s_release_params;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_s_remove_2;
static PyObject *__pyx_n_s_remove_import_hook;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_s_request;
static PyObject *__pyx_n_s_request_helper;
static PyObject *__pyx_n_s_results;
static PyObject *__pyx_n_s_ret;
static PyObject *__pyx_n_s_reverse;
static PyObject *__pyx_n_s_reverse_mapping;
static PyObject *__pyx_n_s_run_forever;
static PyObject *__pyx_kp_s_s_builder_s;
static PyObject *__pyx_kp_s_s_enum;
static PyObject *__pyx_kp_s_s_reader_s;
static PyObject *__pyx_kp_s_s_which_enum;
static PyObject *__pyx_n_s_schema;
static PyObject *__pyx_n_s_schema_2;
static PyObject *__pyx_kp_s_schema_for_s;
static PyObject *__pyx_n_s_schema_id;
static PyObject *__pyx_n_s_scopeId;
static PyObject *__pyx_n_s_segments;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_kp_s_self__error_handler_self__task_s;
static PyObject *__pyx_kp_s_self__pipe_cannot_be_converted_t;
static PyObject *__pyx_kp_s_self__seg_ptrs_self_thisptr_self;
static PyObject *__pyx_kp_s_self_buffered_stream_self_stream;
static PyObject *__pyx_kp_s_self_buffered_stream_self_stream_2;
static PyObject *__pyx_kp_s_self_stream_self_thisptr_self_vi;
static PyObject *__pyx_kp_s_self_thisptr_cannot_be_converted;
static PyObject *__pyx_kp_s_self_thisptr_self_thisptr_child;
static PyObject *__pyx_kp_s_self_thisptr_self_view_cannot_be;
static PyObject *__pyx_kp_s_self_view_cannot_be_converted_to;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_send_2;
static PyObject *__pyx_n_s_send_helper;
static PyObject *__pyx_n_s_sep;
static PyObject *__pyx_n_s_sequential;
static PyObject *__pyx_n_s_server;
static PyObject *__pyx_n_s_server_init;
static PyObject *__pyx_n_s_server_self;
static PyObject *__pyx_n_s_set;
static PyObject *__pyx_n_s_set_2;
static PyObject *__pyx_n_s_set_as_text;
static PyObject *__pyx_n_s_set_by_field;
static PyObject *__pyx_n_s_set_root;
static PyObject *__pyx_n_s_setsockopt;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_skip_copy;
static PyObject *__pyx_n_s_sleep;
static PyObject *__pyx_n_s_slots;
static PyObject *__pyx_n_s_socket;
static PyObject *__pyx_n_s_socket_2;
static PyObject *__pyx_n_s_sorted;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_n_s_str_2;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_struct_reducer;
static PyObject *__pyx_n_s_sub_module;
static PyObject *__pyx_n_s_subversion;
static PyObject *__pyx_n_s_superclasses;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_sys_2;
static PyObject *__pyx_n_s_tail_call;
static PyObject *__pyx_n_s_tb_frame;
static PyObject *__pyx_n_s_tb_lineno;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_then;
static PyObject *__pyx_n_s_threaded;
static PyObject *__pyx_n_s_threading;
static PyObject *__pyx_n_s_threading_2;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_to_bytes;
static PyObject *__pyx_n_s_to_bytes_packed;
static PyObject *__pyx_n_s_to_bytes_packed_helper;
static PyObject *__pyx_n_s_to_dict;
static PyObject *__pyx_n_s_to_python;
static PyObject *__pyx_n_s_to_segments;
static PyObject *__pyx_n_s_total_size;
static PyObject *__pyx_n_s_traceback;
static PyObject *__pyx_n_s_traceback_2;
static PyObject *__pyx_n_s_traversal_limit_in_words;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_type_2;
static PyObject *__pyx_n_s_type_registry;
static PyObject *__pyx_n_s_types;
static PyObject *__pyx_n_s_union_field;
static PyObject *__pyx_kp_s_unix;
static PyObject *__pyx_n_s_upcast;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_upper;
static PyObject *__pyx_kp_s_usr_include;
static PyObject *__pyx_kp_s_usr_include_capnp;
static PyObject *__pyx_kp_s_usr_local_include;
static PyObject *__pyx_kp_s_usr_local_include_capnp;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_verbose;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_n_s_wait;
static PyObject *__pyx_n_s_wait_2;
static PyObject *__pyx_n_s_wait_forever;
static PyObject *__pyx_n_s_warn;
static PyObject *__pyx_n_s_warn_explicit;
static PyObject *__pyx_n_s_warnings;
static PyObject *__pyx_n_s_warnings_2;
static PyObject *__pyx_n_s_which;
static PyObject *__pyx_n_s_which_2;
static PyObject *__pyx_n_s_which_str;
static PyObject *__pyx_n_s_word_count;
static PyObject *__pyx_n_s_wrapper;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_write_message_to_fd;
static PyObject *__pyx_n_s_write_packed_message_to_fd;
static PyObject *__pyx_n_s_writer;
static PyObject *__pyx_n_s_xrange;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_pf_5capnp_3lib_5capnp_register_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_id, PyObject *__pyx_v_klass); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_2deregister_all_types(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_10_make_enum_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_4_make_enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_enum_name, PyObject *__pyx_v_sequential, PyObject *__pyx_v_named); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4file___get__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4line___get__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4type___get__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_11description___get__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_2__str__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_nature, PyObject *__pyx_v_durability, PyObject *__pyx_v_wrapper, PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_4line(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_6type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_8description(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_10__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_12_to_python(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_11displayName___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_7scopeId___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_2id___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_11nestedNodes___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_8isStruct___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_7isConst___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_11isInterface___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_6isEnum___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader_4name___get__(struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader_2id___get__(struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, int64_t __pyx_v_index); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_2__getitem__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, int64_t __pyx_v_index); /* proto */
static Py_ssize_t __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_4__len__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_6__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_8__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder___init__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_field, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_2add(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_4_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6__getitem__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static Py_ssize_t __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8__len__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_10finish(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_12__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_14__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, int64_t __pyx_v_index); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_2__getitem__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, int64_t __pyx_v_index); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_4_set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_6__setitem__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static Py_ssize_t __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_8__len__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_10adopt(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_12disown(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_14init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_16__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_18__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader___getitem__(struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static Py_ssize_t __pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader_2__len__(struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum__as_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_3raw___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_2__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_4__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_6__richcmp__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self, PyObject *__pyx_v_right, int __pyx_v_op); /* proto */
static Py_hash_t __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_8__hash__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_3raw___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField__str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_2__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_4__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_6__richcmp__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self, PyObject *__pyx_v_right, int __pyx_v_op); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_8__call__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_10__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_12__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12_MessageSize___init__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self, uint64_t __pyx_v_word_count, __pyx_t_5capnp_8includes_5types_uint __pyx_v_cap_count); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_MessageSize_10word_count___get__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_10word_count_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_MessageSize_9cap_count___get__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_9cap_count_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_MessageSize_2__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_MessageSize_4__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_6_struct_reducer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema_id, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_2__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_4_get_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_6_has(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_8_has_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_10_which_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_12_which(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_5which___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_14__dir__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_16__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_18__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_20to_dict(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_ordered); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_22as_builder(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_num_first_segment_words); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_10total_size___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_24__reduce_ex__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_proto); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_write(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_file); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_2write_packed(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_file); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_4to_bytes(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_6to_segments(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_8_to_bytes_packed_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_word_count); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_10to_bytes_packed(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_12_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_14_get_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_16__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_18_set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_20_set_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_22__setattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_24_has(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_26_has_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_28init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_30_init_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_32init_resizable_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_34_which_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_36_which(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_5which___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_38adopt(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_40disown(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_42as_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_44copy(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_num_first_segment_words); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_46__dir__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_48__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_50__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_52to_dict(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_ordered); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_54from_dict(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_10total_size___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_56clear_write_flag(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_58__reduce_ex__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_proto); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_2_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_4__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_6__dir__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_8to_dict(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_ordered); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_2__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_4__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_as_struct(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_2as_interface(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_4as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_6as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_2as_struct(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_4as_interface(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_6as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_8set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_10set_as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_text); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_12init_as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_14as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_16as_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_10_EventLoop___init__(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_10_EventLoop_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_10_EventLoop_4_remove(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_10_EventLoop_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_10_EventLoop_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_6_Timer_after_delay(struct __pyx_obj_5capnp_3lib_5capnp__Timer *__pyx_v_self, PyObject *__pyx_v_time); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_6_Timer_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Timer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_6_Timer_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Timer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8getTimer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_10remove_event_loop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ignore_errors); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12create_event_loop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_threaded); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14reset_event_loop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ignore_errors, PyObject *__pyx_v_threaded); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16wait_forever(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18poll_once(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_12_CallContext___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_6params___get__(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_2_get_results(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, __pyx_t_5capnp_8includes_5types_uint __pyx_v_word_count); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_7results___get__(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_4release_params(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_6allow_cancellation(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_8tail_call(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_tailRequest); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_8_Promise___init__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_8_Promise_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_4wait(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_6then(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_error_func); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_8attach(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_10cancel(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_numParents); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_4_obj___get__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_4_obj_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_4_obj_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise___init__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_4wait(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_6then(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_error_func); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_8as_pypromise(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_10attach(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_12cancel(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_numParents); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise___init__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_4_wait(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_6wait(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_8a_wait(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_11as_pypromise(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_13then(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_error_func); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_15_get(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_17__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_19__dir__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_21to_dict(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_ordered); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_23cancel(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_numParents); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_25__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_27__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20join_promises(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_promises); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_8_Request___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Request_2send(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Request_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_8_Request_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_9_Response___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__Response *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer___init__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_server); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_2__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v_field); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_4__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient__find_method_args(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_method_name); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_2_send_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_word_count, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_4_request_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_firstSegmentWordSize, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6_request(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_word_count, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_8_send(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_word_count, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_10__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_12upcast(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14cast_as(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_16__dir__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_2cast_as(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient___init__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_socket, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_2read(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_bufsize); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5write(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_9_connect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_host_string); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_11bootstrap(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_13on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_8_network___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_8_network_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_8_network_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7_stream___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_15__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_17__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer___init__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_socket, PyObject *__pyx_v_bootstrap, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_2read(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_bufsize); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5write(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_connect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_host_string, PyObject *__pyx_v_bootstrap, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_decref(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_14on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_16poll_once(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_18poll_forever(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_21run_forever(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_23bootstrap(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_4port___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_network___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_network_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_network_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_7_stream___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_25__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_27__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_AsyncIoStream___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_AsyncIoStream_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe___init__(struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe_2_init(struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_16_FdAsyncIoStream___init__(struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *__pyx_v_self, int __pyx_v_fd); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_FdAsyncIoStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_FdAsyncIoStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_15PyAsyncIoStream___init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream *__pyx_v_self, CYTHON_UNUSED int __pyx_v_fd); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15PyAsyncIoStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15PyAsyncIoStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair___init__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_2fulfill(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise___get__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_as_const_value(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_2as_struct(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_4as_interface(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_6as_enum(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_8get_proto(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_4node___get__(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_10fieldnames_7__get___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_10fieldnames___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_12union_fields_7__get___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_12union_fields___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields_7__get___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_6fields___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_11fields_list___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_4node___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema___richcmp__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_other, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_2__repr__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_5proto___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField___repr__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod_10param_type___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod_11result_type___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names_7__get___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited_7__get___genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_7methods___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_17methods_inherited___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_12superclasses___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_4node___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema___repr__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumSchema_10enumerants___get__(struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumSchema_4node___get__(struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumSchema___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumSchema_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_SchemaType___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_SchemaType_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_11_ListSchema___init__(struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_ListSchema_11elementType___get__(struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_ListSchema_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_ListSchema_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_ParsedSchema_get_nested(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_ParsedSchema_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_ParsedSchema_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_StructABCMeta___instancecheck__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_2read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_4read_multiple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_skip_copy); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_6read_packed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_8read_multiple_packed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_skip_copy); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_10read_multiple_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_12read_multiple_bytes_packed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_14from_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_builder); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_16from_segments(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_segments, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_18from_bytes_packed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_20__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_first_segment_words, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_22new_message(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_first_segment_words, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule_8__init___server_init(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_server_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule_2_new_client(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_server); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule_4_new_server(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_server); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumModule___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_name); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr___cinit__(struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_parent); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12SchemaParser___cinit__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4_parse_disk_file(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, PyObject *__pyx_v_displayName, PyObject *__pyx_v_diskPath, PyObject *__pyx_v_imports); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_6Reader___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_7Builder___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load__load(PyObject *__pyx_self, PyObject *__pyx_v_nodeSchema, PyObject *__pyx_v_module); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_6load(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, PyObject *__pyx_v_file_name, PyObject *__pyx_v_display_name, PyObject *__pyx_v_imports); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id___get__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_2__init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_4init_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_6get_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_8get_root_as_any(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_10set_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_12get_segments_for_output(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_14new_orphan(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_21_MallocMessageBuilder___init__(struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *__pyx_v_self, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_MallocMessageBuilder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_MallocMessageBuilder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_MessageReader___init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_2get_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, PyObject *__pyx_v_schema); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_4get_root_as_any(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader___init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__pyx_v_self); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes___init__(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader___init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__pyx_v_self); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_schema, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_skip_copy); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4__next__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6__iter__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4file___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_schema, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_skip_copy); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4__next__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6__iter__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_schema, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_2__next__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_4__iter__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_8__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_schema, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_4__next__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6__iter__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer___init__(struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_11_BufferView___init__(struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_11_BufferView_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_BufferView_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_BufferView_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned___init__(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_self); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *__pyx_v_self, PyObject *__pyx_v_segments, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder___init__(struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */
static void __pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_message_to_packed_bytes(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_message); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_write_message_to_fd(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_fd, struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_message); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_26_write_packed_message_to_fd(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_fd, struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_message); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_28cleanup_global_schema_parser(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_30load(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_name, PyObject *__pyx_v_display_name, PyObject *__pyx_v_imports); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Loader___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fullname, PyObject *__pyx_v_path, PyObject *__pyx_v_additional_paths); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Loader_2load_module(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fullname); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_9_Importer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_additional_paths); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_9_Importer_2find_module(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fullname, PyObject *__pyx_v_package_path); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_32add_import_hook(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_additional_paths); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_34remove_import_hook(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_36_init_capnp_api(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_38__pyx_unpickle__DynamicResizableListBuilder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_40__pyx_unpickle__DynamicEnumField(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_42__pyx_unpickle__MessageSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_44__pyx_unpickle__DynamicCapabilityServer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5capnp_3lib_5capnp_46__pyx_unpickle__MultipleBytesMessageReader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__StructSchemaField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__StringArrayPtr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_SchemaParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicOrphan(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicStructReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicStructBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicEnumField(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Schema(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__InterfaceSchema(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicEnum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicListBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MessageBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__KjExceptionWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__NodeReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__NestedNodeReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicListReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicResizableListBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__List_NestedNode_Reader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MessageSize(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicStructPipeline(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicObjectReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicObjectBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__EventLoop(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Timer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__CallContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Promise(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__VoidPromise(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__RemotePromise(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Request(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Response(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicCapabilityServer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicCapabilityClient(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__CapabilityClient(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__TwoPartyVatNetwork(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_TwoPartyClient(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_TwoPartyServer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__AsyncIoStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__TwoWayPipe(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__FdAsyncIoStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_PyAsyncIoStream(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_PromiseFulfillerPair(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__StructSchema(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__InterfaceMethod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__EnumSchema(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__SchemaType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__ListSchema(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__ParsedSchema(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MallocMessageBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__StreamFdMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__PackedMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__PackedMessageReaderBytes(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__InputMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__PackedFdMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MultipleMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MultiplePackedMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MultipleBytesMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__AlignedBuffer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__BufferView(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__FlatArrayMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__SegmentArrayMessageReader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__FlatMessageBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct___make_enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_3_read(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_4_read(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_5_write(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_7___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_9___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_11___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_13___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_15___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_17_load(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get_2, 0, 0, 0};
static PyObject *__pyx_float_0_01;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_8;
static PyObject *__pyx_int_77509169;
static PyObject *__pyx_int_88241323;
static PyObject *__pyx_int_182503194;
static PyObject *__pyx_int_220006191;
static PyObject *__pyx_int_224926043;
static PyObject *__pyx_int_neg_8;
static PyObject *__pyx_k__84;
static PyObject *__pyx_k__132;
static PyObject *__pyx_k__139;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
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_slice__39;
static PyObject *__pyx_slice__46;
static PyObject *__pyx_slice__79;
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__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__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;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_tuple__156;
static PyObject *__pyx_tuple__158;
static PyObject *__pyx_tuple__160;
static PyObject *__pyx_tuple__162;
static PyObject *__pyx_tuple__164;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__181;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__184;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__198;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__202;
static PyObject *__pyx_tuple__204;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_tuple__210;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__212;
static PyObject *__pyx_tuple__214;
static PyObject *__pyx_tuple__216;
static PyObject *__pyx_tuple__218;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__228;
static PyObject *__pyx_tuple__230;
static PyObject *__pyx_tuple__232;
static PyObject *__pyx_tuple__234;
static PyObject *__pyx_tuple__236;
static PyObject *__pyx_tuple__238;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__247;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__251;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__153;
static PyObject *__pyx_codeobj__155;
static PyObject *__pyx_codeobj__157;
static PyObject *__pyx_codeobj__159;
static PyObject *__pyx_codeobj__161;
static PyObject *__pyx_codeobj__163;
static PyObject *__pyx_codeobj__165;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__173;
static PyObject *__pyx_codeobj__177;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__197;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__203;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__209;
static PyObject *__pyx_codeobj__213;
static PyObject *__pyx_codeobj__215;
static PyObject *__pyx_codeobj__217;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__227;
static PyObject *__pyx_codeobj__229;
static PyObject *__pyx_codeobj__231;
static PyObject *__pyx_codeobj__233;
static PyObject *__pyx_codeobj__235;
static PyObject *__pyx_codeobj__237;
static PyObject *__pyx_codeobj__240;
static PyObject *__pyx_codeobj__241;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__244;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__248;
static PyObject *__pyx_codeobj__250;
static PyObject *__pyx_codeobj__252;
/* Late includes */

/* "capnp/lib/capnp.pyx":45
 * cdef dict _type_registry = {}
 * 
 * def register_type(id, klass):             # <<<<<<<<<<<<<<
 *     _type_registry[id] = klass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_1register_type(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_register_type[] = "register_type(id, klass)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_1register_type = {"register_type", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_1register_type, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_register_type};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_1register_type(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_id = 0;
  PyObject *__pyx_v_klass = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("register_type (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_id,&__pyx_n_s_klass,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_klass)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("register_type", 1, 2, 2, 1); __PYX_ERR(0, 45, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register_type") < 0)) __PYX_ERR(0, 45, __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_id = values[0];
    __pyx_v_klass = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("register_type", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 45, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.register_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_register_type(__pyx_self, __pyx_v_id, __pyx_v_klass);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_register_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_id, PyObject *__pyx_v_klass) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("register_type", 0);

  /* "capnp/lib/capnp.pyx":46
 * 
 * def register_type(id, klass):
 *     _type_registry[id] = klass             # <<<<<<<<<<<<<<
 * 
 * def deregister_all_types():
 */
  if (unlikely(__pyx_v_5capnp_3lib_5capnp__type_registry == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 46, __pyx_L1_error)
  }
  if (unlikely(PyDict_SetItem(__pyx_v_5capnp_3lib_5capnp__type_registry, __pyx_v_id, __pyx_v_klass) < 0)) __PYX_ERR(0, 46, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":45
 * cdef dict _type_registry = {}
 * 
 * def register_type(id, klass):             # <<<<<<<<<<<<<<
 *     _type_registry[id] = klass
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.register_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":48
 *     _type_registry[id] = klass
 * 
 * def deregister_all_types():             # <<<<<<<<<<<<<<
 *     _type_registry = {}
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_3deregister_all_types(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_2deregister_all_types[] = "deregister_all_types()";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_3deregister_all_types = {"deregister_all_types", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_3deregister_all_types, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_2deregister_all_types};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_3deregister_all_types(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deregister_all_types (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_2deregister_all_types(__pyx_self);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_2deregister_all_types(CYTHON_UNUSED PyObject *__pyx_self) {
  CYTHON_UNUSED PyObject *__pyx_v__type_registry = NULL;
  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("deregister_all_types", 0);

  /* "capnp/lib/capnp.pyx":49
 * 
 * def deregister_all_types():
 *     _type_registry = {}             # <<<<<<<<<<<<<<
 * 
 * # By making it public, we'll be able to call it from capabilityHelper.h
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__type_registry = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":48
 *     _type_registry[id] = klass
 * 
 * def deregister_all_types():             # <<<<<<<<<<<<<<
 *     _type_registry = {}
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.deregister_all_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__type_registry);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":52
 * 
 * # By making it public, we'll be able to call it from capabilityHelper.h
 * cdef api object wrap_dynamic_struct_reader(Response & r) with gil:             # <<<<<<<<<<<<<<
 *     return _Response()._init_childptr(new Response(moveResponse(r)), None)
 * 
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_wrap_dynamic_struct_reader( ::capnp::Response< ::capnp::DynamicStruct> &__pyx_v_r) {
  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;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("wrap_dynamic_struct_reader", 0);

  /* "capnp/lib/capnp.pyx":53
 * # By making it public, we'll be able to call it from capabilityHelper.h
 * cdef api object wrap_dynamic_struct_reader(Response & r) with gil:
 *     return _Response()._init_childptr(new Response(moveResponse(r)), None)             # <<<<<<<<<<<<<<
 * 
 * cdef api PyObject * wrap_remote_call(PyObject * func, Response & r) except * with gil:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Response)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Response *)((struct __pyx_obj_5capnp_3lib_5capnp__Response *)__pyx_t_1)->__pyx_base.__pyx_vtab)->_init_childptr(((struct __pyx_obj_5capnp_3lib_5capnp__Response *)__pyx_t_1), new  ::capnp::Response< ::capnp::DynamicStruct>(std::move(__pyx_v_r)), Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __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;

  /* "capnp/lib/capnp.pyx":52
 * 
 * # By making it public, we'll be able to call it from capabilityHelper.h
 * cdef api object wrap_dynamic_struct_reader(Response & r) with gil:             # <<<<<<<<<<<<<<
 *     return _Response()._init_childptr(new Response(moveResponse(r)), None)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp.wrap_dynamic_struct_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":55
 *     return _Response()._init_childptr(new Response(moveResponse(r)), None)
 * 
 * cdef api PyObject * wrap_remote_call(PyObject * func, Response & r) except * with gil:             # <<<<<<<<<<<<<<
 *     response = _Response()._init_childptr(new Response(moveResponse(r)), None)
 * 
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_wrap_remote_call(PyObject *__pyx_v_func,  ::capnp::Response< ::capnp::DynamicStruct> &__pyx_v_r) {
  PyObject *__pyx_v_response = NULL;
  PyObject *__pyx_v_func_obj = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("wrap_remote_call", 0);

  /* "capnp/lib/capnp.pyx":56
 * 
 * cdef api PyObject * wrap_remote_call(PyObject * func, Response & r) except * with gil:
 *     response = _Response()._init_childptr(new Response(moveResponse(r)), None)             # <<<<<<<<<<<<<<
 * 
 *     func_obj = <object>func
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Response)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Response *)((struct __pyx_obj_5capnp_3lib_5capnp__Response *)__pyx_t_1)->__pyx_base.__pyx_vtab)->_init_childptr(((struct __pyx_obj_5capnp_3lib_5capnp__Response *)__pyx_t_1), new  ::capnp::Response< ::capnp::DynamicStruct>(std::move(__pyx_v_r)), Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_response = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":58
 *     response = _Response()._init_childptr(new Response(moveResponse(r)), None)
 * 
 *     func_obj = <object>func             # <<<<<<<<<<<<<<
 *     ret = func_obj(response)
 *     Py_INCREF(ret)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_func);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_func_obj = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":59
 * 
 *     func_obj = <object>func
 *     ret = func_obj(response)             # <<<<<<<<<<<<<<
 *     Py_INCREF(ret)
 *     return <PyObject *>ret
 */
  __Pyx_INCREF(__pyx_v_func_obj);
  __pyx_t_1 = __pyx_v_func_obj; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_response) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_response);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ret = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":60
 *     func_obj = <object>func
 *     ret = func_obj(response)
 *     Py_INCREF(ret)             # <<<<<<<<<<<<<<
 *     return <PyObject *>ret
 * 
 */
  Py_INCREF(__pyx_v_ret);

  /* "capnp/lib/capnp.pyx":61
 *     ret = func_obj(response)
 *     Py_INCREF(ret)
 *     return <PyObject *>ret             # <<<<<<<<<<<<<<
 * 
 * cdef _find_field_order(struct_node):
 */
  __pyx_r = ((PyObject *)__pyx_v_ret);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":55
 *     return _Response()._init_childptr(new Response(moveResponse(r)), None)
 * 
 * cdef api PyObject * wrap_remote_call(PyObject * func, Response & r) except * with gil:             # <<<<<<<<<<<<<<
 *     response = _Response()._init_childptr(new Response(moveResponse(r)), None)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp.wrap_remote_call", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_response);
  __Pyx_XDECREF(__pyx_v_func_obj);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":63
 *     return <PyObject *>ret
 * 
 * cdef _find_field_order(struct_node):             # <<<<<<<<<<<<<<
 *     return [f.name for f in sorted(struct_node.fields, key=_attrgetter('codeOrder'))]
 * 
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp__find_field_order(PyObject *__pyx_v_struct_node) {
  PyObject *__pyx_v_f = 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)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_find_field_order", 0);

  /* "capnp/lib/capnp.pyx":64
 * 
 * cdef _find_field_order(struct_node):
 *     return [f.name for f in sorted(struct_node.fields, key=_attrgetter('codeOrder'))]             # <<<<<<<<<<<<<<
 * 
 * cdef api VoidPromise * call_server_method(PyObject * _server, char * _method_name, CallContext & _context) except * with gil:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct_node, __pyx_n_s_fields); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_attrgetter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_codeOrder) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_codeOrder);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_t_4) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
    __pyx_t_8 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 64, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_8)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 64, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 64, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_8(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 64, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":63
 *     return <PyObject *>ret
 * 
 * cdef _find_field_order(struct_node):             # <<<<<<<<<<<<<<
 *     return [f.name for f in sorted(struct_node.fields, key=_attrgetter('codeOrder'))]
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._find_field_order", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":66
 *     return [f.name for f in sorted(struct_node.fields, key=_attrgetter('codeOrder'))]
 * 
 * cdef api VoidPromise * call_server_method(PyObject * _server, char * _method_name, CallContext & _context) except * with gil:             # <<<<<<<<<<<<<<
 *     server = <object>_server
 *     method_name = <object>_method_name
 */

static __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise *__pyx_f_5capnp_3lib_5capnp_call_server_method(PyObject *__pyx_v__server, char *__pyx_v__method_name,  ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct> &__pyx_v__context) {
  PyObject *__pyx_v_server = NULL;
  PyObject *__pyx_v_method_name = NULL;
  PyObject *__pyx_v_context = NULL;
  PyObject *__pyx_v_func = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_warning_msg = NULL;
  PyObject *__pyx_v_params = NULL;
  PyObject *__pyx_v_params_dict = NULL;
  PyObject *__pyx_v_names = NULL;
  PyObject *__pyx_v_results = NULL;
  PyObject *__pyx_v_arg_name = NULL;
  PyObject *__pyx_v_arg_val = NULL;
  PyObject *__pyx_7genexpr__pyx_v_name = NULL;
  __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject *(*__pyx_t_14)(PyObject *);
  Py_ssize_t __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("call_server_method", 0);

  /* "capnp/lib/capnp.pyx":67
 * 
 * cdef api VoidPromise * call_server_method(PyObject * _server, char * _method_name, CallContext & _context) except * with gil:
 *     server = <object>_server             # <<<<<<<<<<<<<<
 *     method_name = <object>_method_name
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v__server);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_server = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":68
 * cdef api VoidPromise * call_server_method(PyObject * _server, char * _method_name, CallContext & _context) except * with gil:
 *     server = <object>_server
 *     method_name = <object>_method_name             # <<<<<<<<<<<<<<
 * 
 *     context = _CallContext()._init(_context) # TODO:MEMORY: invalidate this with promise chain
 */
  __pyx_t_1 = __Pyx_PyStr_FromString(__pyx_v__method_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_method_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":70
 *     method_name = <object>_method_name
 * 
 *     context = _CallContext()._init(_context) # TODO:MEMORY: invalidate this with promise chain             # <<<<<<<<<<<<<<
 *     func = getattr(server, method_name+'_context', None)
 *     if func is not None:
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__CallContext)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__CallContext *)((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_t_2), __pyx_v__context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_context = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":71
 * 
 *     context = _CallContext()._init(_context) # TODO:MEMORY: invalidate this with promise chain
 *     func = getattr(server, method_name+'_context', None)             # <<<<<<<<<<<<<<
 *     if func is not None:
 *         ret = func(context)
 */
  __pyx_t_1 = PyNumber_Add(__pyx_v_method_name, __pyx_n_s_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_server, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_func = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":72
 *     context = _CallContext()._init(_context) # TODO:MEMORY: invalidate this with promise chain
 *     func = getattr(server, method_name+'_context', None)
 *     if func is not None:             # <<<<<<<<<<<<<<
 *         ret = func(context)
 *         if ret is not None:
 */
  __pyx_t_3 = (__pyx_v_func != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "capnp/lib/capnp.pyx":73
 *     func = getattr(server, method_name+'_context', None)
 *     if func is not None:
 *         ret = func(context)             # <<<<<<<<<<<<<<
 *         if ret is not None:
 *             if type(ret) is _VoidPromise:
 */
    __Pyx_INCREF(__pyx_v_func);
    __pyx_t_1 = __pyx_v_func; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_context) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_context);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_ret = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":74
 *     if func is not None:
 *         ret = func(context)
 *         if ret is not None:             # <<<<<<<<<<<<<<
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 */
    __pyx_t_4 = (__pyx_v_ret != Py_None);
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {

      /* "capnp/lib/capnp.pyx":75
 *         ret = func(context)
 *         if ret is not None:
 *             if type(ret) is _VoidPromise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:
 */
      __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v_ret)) == ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__VoidPromise));
      __pyx_t_4 = (__pyx_t_3 != 0);
      if (__pyx_t_4) {

        /* "capnp/lib/capnp.pyx":76
 *         if ret is not None:
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))             # <<<<<<<<<<<<<<
 *             elif type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 */
        __pyx_r = new __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise(std::move((*((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_ret)->thisptr)));
        goto __pyx_L0;

        /* "capnp/lib/capnp.pyx":75
 *         ret = func(context)
 *         if ret is not None:
 *             if type(ret) is _VoidPromise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:
 */
      }

      /* "capnp/lib/capnp.pyx":77
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 */
      __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_ret)) == ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise));
      __pyx_t_3 = (__pyx_t_4 != 0);
      if (__pyx_t_3) {

        /* "capnp/lib/capnp.pyx":78
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))             # <<<<<<<<<<<<<<
 *             else:
 *                 try:
 */
        __pyx_r = new __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise(convert_to_voidpromise((*((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_ret)->thisptr)));
        goto __pyx_L0;

        /* "capnp/lib/capnp.pyx":77
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 */
      }

      /* "capnp/lib/capnp.pyx":80
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:
 */
      /*else*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_6);
          __Pyx_XGOTREF(__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_8);
          /*try:*/ {

            /* "capnp/lib/capnp.pyx":81
 *             else:
 *                 try:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))             # <<<<<<<<<<<<<<
 *                 except:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise' % (method_name)
 */
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_ret); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_INCREF(__pyx_v_method_name);
            __Pyx_GIVEREF(__pyx_v_method_name);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_method_name);
            __Pyx_GIVEREF(__pyx_t_2);
            PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
            __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Server_function_s_returned_a_val, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_v_warning_msg = ((PyObject*)__pyx_t_2);
            __pyx_t_2 = 0;

            /* "capnp/lib/capnp.pyx":80
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:
 */
          }
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L11_try_end;
          __pyx_L6_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "capnp/lib/capnp.pyx":82
 *                 try:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:             # <<<<<<<<<<<<<<
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise' % (method_name)
 *                 _warnings.warn_explicit(warning_msg, UserWarning, _inspect.getsourcefile(func), _inspect.getsourcelines(func)[1])
 */
          /*except:*/ {
            __Pyx_AddTraceback("capnp.lib.capnp.call_server_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 82, __pyx_L8_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_t_5);

            /* "capnp/lib/capnp.pyx":83
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise' % (method_name)             # <<<<<<<<<<<<<<
 *                 _warnings.warn_explicit(warning_msg, UserWarning, _inspect.getsourcefile(func), _inspect.getsourcelines(func)[1])
 * 
 */
            __pyx_t_9 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Server_function_s_returned_a_val_2, __pyx_v_method_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 83, __pyx_L8_except_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_XDECREF_SET(__pyx_v_warning_msg, ((PyObject*)__pyx_t_9));
            __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            goto __pyx_L7_exception_handled;
          }
          __pyx_L8_except_error:;

          /* "capnp/lib/capnp.pyx":80
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:
 */
          __Pyx_XGIVEREF(__pyx_t_6);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
          goto __pyx_L1_error;
          __pyx_L7_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_6);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
          __pyx_L11_try_end:;
        }

        /* "capnp/lib/capnp.pyx":84
 *                 except:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise' % (method_name)
 *                 _warnings.warn_explicit(warning_msg, UserWarning, _inspect.getsourcefile(func), _inspect.getsourcelines(func)[1])             # <<<<<<<<<<<<<<
 * 
 *         if ret is not None:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn_explicit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_inspect); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_getsourcefile); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_v_func) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_func);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_inspect); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_getsourcelines); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        __pyx_t_10 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_9, __pyx_v_func) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_func);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_10, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        __pyx_t_12 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_12 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_warning_msg, __pyx_builtin_UserWarning, __pyx_t_1, __pyx_t_11};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_warning_msg, __pyx_builtin_UserWarning, __pyx_t_1, __pyx_t_11};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (__pyx_t_10) {
            __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
          }
          __Pyx_INCREF(__pyx_v_warning_msg);
          __Pyx_GIVEREF(__pyx_v_warning_msg);
          PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_12, __pyx_v_warning_msg);
          __Pyx_INCREF(__pyx_builtin_UserWarning);
          __Pyx_GIVEREF(__pyx_builtin_UserWarning);
          PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_12, __pyx_builtin_UserWarning);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_12, __pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_12, __pyx_t_11);
          __pyx_t_1 = 0;
          __pyx_t_11 = 0;
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "capnp/lib/capnp.pyx":74
 *     if func is not None:
 *         ret = func(context)
 *         if ret is not None:             # <<<<<<<<<<<<<<
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 */
    }

    /* "capnp/lib/capnp.pyx":86
 *                 _warnings.warn_explicit(warning_msg, UserWarning, _inspect.getsourcefile(func), _inspect.getsourcelines(func)[1])
 * 
 *         if ret is not None:             # <<<<<<<<<<<<<<
 *             if type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 */
    __pyx_t_3 = (__pyx_v_ret != Py_None);
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {

      /* "capnp/lib/capnp.pyx":87
 * 
 *         if ret is not None:
 *             if type(ret) is _Promise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             elif type(ret) is _Promise:
 */
      __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_ret)) == ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise));
      __pyx_t_3 = (__pyx_t_4 != 0);
      if (__pyx_t_3) {

        /* "capnp/lib/capnp.pyx":88
 *         if ret is not None:
 *             if type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))             # <<<<<<<<<<<<<<
 *             elif type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 */
        __pyx_r = new __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise(convert_to_voidpromise((*((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_ret)->thisptr)));
        goto __pyx_L0;

        /* "capnp/lib/capnp.pyx":87
 * 
 *         if ret is not None:
 *             if type(ret) is _Promise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             elif type(ret) is _Promise:
 */
      }

      /* "capnp/lib/capnp.pyx":89
 *             if type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             elif type(ret) is _Promise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 */
      __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v_ret)) == ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise));
      __pyx_t_4 = (__pyx_t_3 != 0);
      if (__pyx_t_4) {

        /* "capnp/lib/capnp.pyx":90
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             elif type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))             # <<<<<<<<<<<<<<
 *             else:
 *                 try:
 */
        __pyx_r = new __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise(convert_to_voidpromise((*((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_ret)->thisptr)));
        goto __pyx_L0;

        /* "capnp/lib/capnp.pyx":89
 *             if type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             elif type(ret) is _Promise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 */
      }

      /* "capnp/lib/capnp.pyx":92
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:
 */
      /*else*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_6);
          /*try:*/ {

            /* "capnp/lib/capnp.pyx":93
 *             else:
 *                 try:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))             # <<<<<<<<<<<<<<
 *                 except:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise' % (method_name)
 */
            __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_ret); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_INCREF(__pyx_v_method_name);
            __Pyx_GIVEREF(__pyx_v_method_name);
            PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_method_name);
            __Pyx_GIVEREF(__pyx_t_5);
            PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
            __pyx_t_5 = 0;
            __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Server_function_s_returned_a_val, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF_SET(__pyx_v_warning_msg, ((PyObject*)__pyx_t_5));
            __pyx_t_5 = 0;

            /* "capnp/lib/capnp.pyx":92
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:
 */
          }
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L21_try_end;
          __pyx_L16_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

          /* "capnp/lib/capnp.pyx":94
 *                 try:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:             # <<<<<<<<<<<<<<
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise' % (method_name)
 *                 _warnings.warn_explicit(warning_msg, UserWarning, _inspect.getsourcefile(func), _inspect.getsourcelines(func)[1])
 */
          /*except:*/ {
            __Pyx_AddTraceback("capnp.lib.capnp.call_server_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_9) < 0) __PYX_ERR(0, 94, __pyx_L18_except_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GOTREF(__pyx_t_9);

            /* "capnp/lib/capnp.pyx":95
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise' % (method_name)             # <<<<<<<<<<<<<<
 *                 _warnings.warn_explicit(warning_msg, UserWarning, _inspect.getsourcefile(func), _inspect.getsourcelines(func)[1])
 *     else:
 */
            __pyx_t_11 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Server_function_s_returned_a_val_2, __pyx_v_method_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 95, __pyx_L18_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_XDECREF_SET(__pyx_v_warning_msg, ((PyObject*)__pyx_t_11));
            __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L17_exception_handled;
          }
          __pyx_L18_except_error:;

          /* "capnp/lib/capnp.pyx":92
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             else:
 *                 try:             # <<<<<<<<<<<<<<
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise: return = %s' % (method_name, str(ret))
 *                 except:
 */
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_6);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
          goto __pyx_L1_error;
          __pyx_L17_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_6);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
          __pyx_L21_try_end:;
        }

        /* "capnp/lib/capnp.pyx":96
 *                 except:
 *                     warning_msg = 'Server function (%s) returned a value that was not a Promise' % (method_name)
 *                 _warnings.warn_explicit(warning_msg, UserWarning, _inspect.getsourcefile(func), _inspect.getsourcelines(func)[1])             # <<<<<<<<<<<<<<
 *     else:
 *         func = getattr(server, method_name) # will raise if no function found
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_warnings); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn_explicit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_inspect); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_getsourcefile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_11, __pyx_v_func) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_func);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_inspect); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_getsourcelines); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_v_func) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_func);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 96, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        __pyx_t_12 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_12 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[5] = {__pyx_t_1, __pyx_v_warning_msg, __pyx_builtin_UserWarning, __pyx_t_2, __pyx_t_10};
          __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 96, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[5] = {__pyx_t_1, __pyx_v_warning_msg, __pyx_builtin_UserWarning, __pyx_t_2, __pyx_t_10};
          __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 96, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 96, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (__pyx_t_1) {
            __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
          }
          __Pyx_INCREF(__pyx_v_warning_msg);
          __Pyx_GIVEREF(__pyx_v_warning_msg);
          PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_v_warning_msg);
          __Pyx_INCREF(__pyx_builtin_UserWarning);
          __Pyx_GIVEREF(__pyx_builtin_UserWarning);
          PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_builtin_UserWarning);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_12, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_12, __pyx_t_10);
          __pyx_t_2 = 0;
          __pyx_t_10 = 0;
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 96, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }

      /* "capnp/lib/capnp.pyx":86
 *                 _warnings.warn_explicit(warning_msg, UserWarning, _inspect.getsourcefile(func), _inspect.getsourcelines(func)[1])
 * 
 *         if ret is not None:             # <<<<<<<<<<<<<<
 *             if type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 */
    }

    /* "capnp/lib/capnp.pyx":72
 *     context = _CallContext()._init(_context) # TODO:MEMORY: invalidate this with promise chain
 *     func = getattr(server, method_name+'_context', None)
 *     if func is not None:             # <<<<<<<<<<<<<<
 *         ret = func(context)
 *         if ret is not None:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":98
 *                 _warnings.warn_explicit(warning_msg, UserWarning, _inspect.getsourcefile(func), _inspect.getsourcelines(func)[1])
 *     else:
 *         func = getattr(server, method_name) # will raise if no function found             # <<<<<<<<<<<<<<
 *         params = context.params
 *         params_dict = {name : getattr(params, name) for name in params.schema.fieldnames}
 */
  /*else*/ {
    __pyx_t_9 = __Pyx_GetAttr(__pyx_v_server, __pyx_v_method_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 98, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF_SET(__pyx_v_func, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":99
 *     else:
 *         func = getattr(server, method_name) # will raise if no function found
 *         params = context.params             # <<<<<<<<<<<<<<
 *         params_dict = {name : getattr(params, name) for name in params.schema.fieldnames}
 *         params_dict['_context'] = context
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_params); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_v_params = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":100
 *         func = getattr(server, method_name) # will raise if no function found
 *         params = context.params
 *         params_dict = {name : getattr(params, name) for name in params.schema.fieldnames}             # <<<<<<<<<<<<<<
 *         params_dict['_context'] = context
 *         ret = func(**params_dict)
 */
    { /* enter inner scope */
      __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L26_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_schema); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L26_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fieldnames); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 100, __pyx_L26_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
        __pyx_t_5 = __pyx_t_11; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0;
        __pyx_t_14 = NULL;
      } else {
        __pyx_t_13 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 100, __pyx_L26_error)
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      for (;;) {
        if (likely(!__pyx_t_14)) {
          if (likely(PyList_CheckExact(__pyx_t_5))) {
            if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 100, __pyx_L26_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 100, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          } else {
            if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13); __Pyx_INCREF(__pyx_t_11); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 100, __pyx_L26_error)
            #else
            __pyx_t_11 = PySequence_ITEM(__pyx_t_5, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 100, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_11);
            #endif
          }
        } else {
          __pyx_t_11 = __pyx_t_14(__pyx_t_5);
          if (unlikely(!__pyx_t_11)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 100, __pyx_L26_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_name, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_GetAttr(__pyx_v_params, __pyx_7genexpr__pyx_v_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 100, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (unlikely(PyDict_SetItem(__pyx_t_9, (PyObject*)__pyx_7genexpr__pyx_v_name, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 100, __pyx_L26_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0;
      goto __pyx_L29_exit_scope;
      __pyx_L26_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name); __pyx_7genexpr__pyx_v_name = 0;
      goto __pyx_L1_error;
      __pyx_L29_exit_scope:;
    } /* exit inner scope */
    __pyx_v_params_dict = ((PyObject*)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":101
 *         params = context.params
 *         params_dict = {name : getattr(params, name) for name in params.schema.fieldnames}
 *         params_dict['_context'] = context             # <<<<<<<<<<<<<<
 *         ret = func(**params_dict)
 * 
 */
    if (unlikely(PyDict_SetItem(__pyx_v_params_dict, __pyx_n_s_context, __pyx_v_context) < 0)) __PYX_ERR(0, 101, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":102
 *         params_dict = {name : getattr(params, name) for name in params.schema.fieldnames}
 *         params_dict['_context'] = context
 *         ret = func(**params_dict)             # <<<<<<<<<<<<<<
 * 
 *         if ret is not None:
 */
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_v_func, __pyx_empty_tuple, __pyx_v_params_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_v_ret = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":104
 *         ret = func(**params_dict)
 * 
 *         if ret is not None:             # <<<<<<<<<<<<<<
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 */
    __pyx_t_4 = (__pyx_v_ret != Py_None);
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {

      /* "capnp/lib/capnp.pyx":105
 * 
 *         if ret is not None:
 *             if type(ret) is _VoidPromise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:
 */
      __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v_ret)) == ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__VoidPromise));
      __pyx_t_4 = (__pyx_t_3 != 0);
      if (__pyx_t_4) {

        /* "capnp/lib/capnp.pyx":106
 *         if ret is not None:
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))             # <<<<<<<<<<<<<<
 *             elif type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 */
        __pyx_r = new __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise(std::move((*((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_ret)->thisptr)));
        goto __pyx_L0;

        /* "capnp/lib/capnp.pyx":105
 * 
 *         if ret is not None:
 *             if type(ret) is _VoidPromise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:
 */
      }

      /* "capnp/lib/capnp.pyx":107
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             if not isinstance(ret, tuple):
 */
      __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_ret)) == ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise));
      __pyx_t_3 = (__pyx_t_4 != 0);
      if (__pyx_t_3) {

        /* "capnp/lib/capnp.pyx":108
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))             # <<<<<<<<<<<<<<
 *             if not isinstance(ret, tuple):
 *                 ret = (ret,)
 */
        __pyx_r = new __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise(convert_to_voidpromise((*((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_ret)->thisptr)));
        goto __pyx_L0;

        /* "capnp/lib/capnp.pyx":107
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 *             elif type(ret) is _Promise:             # <<<<<<<<<<<<<<
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             if not isinstance(ret, tuple):
 */
      }

      /* "capnp/lib/capnp.pyx":109
 *             elif type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             if not isinstance(ret, tuple):             # <<<<<<<<<<<<<<
 *                 ret = (ret,)
 *             names = _find_field_order(context.results.schema.node.struct)
 */
      __pyx_t_3 = PyTuple_Check(__pyx_v_ret); 
      __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
      if (__pyx_t_4) {

        /* "capnp/lib/capnp.pyx":110
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             if not isinstance(ret, tuple):
 *                 ret = (ret,)             # <<<<<<<<<<<<<<
 *             names = _find_field_order(context.results.schema.node.struct)
 *             if len(ret) > len(names):
 */
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 110, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_ret);
        __Pyx_GIVEREF(__pyx_v_ret);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_ret);
        __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_9);
        __pyx_t_9 = 0;

        /* "capnp/lib/capnp.pyx":109
 *             elif type(ret) is _Promise:
 *                 return new VoidPromise(helpers.convert_to_voidpromise(deref((<_Promise>ret).thisptr)))
 *             if not isinstance(ret, tuple):             # <<<<<<<<<<<<<<
 *                 ret = (ret,)
 *             names = _find_field_order(context.results.schema.node.struct)
 */
      }

      /* "capnp/lib/capnp.pyx":111
 *             if not isinstance(ret, tuple):
 *                 ret = (ret,)
 *             names = _find_field_order(context.results.schema.node.struct)             # <<<<<<<<<<<<<<
 *             if len(ret) > len(names):
 *                 raise KjException('Too many values returned from `%s`. Expected %d and got %d' % (method_name, len(names), len(ret)))
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_results); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_schema); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_struct); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __pyx_f_5capnp_3lib_5capnp__find_field_order(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_names = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "capnp/lib/capnp.pyx":112
 *                 ret = (ret,)
 *             names = _find_field_order(context.results.schema.node.struct)
 *             if len(ret) > len(names):             # <<<<<<<<<<<<<<
 *                 raise KjException('Too many values returned from `%s`. Expected %d and got %d' % (method_name, len(names), len(ret)))
 * 
 */
      __pyx_t_13 = PyObject_Length(__pyx_v_ret); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 112, __pyx_L1_error)
      __pyx_t_15 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 112, __pyx_L1_error)
      __pyx_t_4 = ((__pyx_t_13 > __pyx_t_15) != 0);
      if (unlikely(__pyx_t_4)) {

        /* "capnp/lib/capnp.pyx":113
 *             names = _find_field_order(context.results.schema.node.struct)
 *             if len(ret) > len(names):
 *                 raise KjException('Too many values returned from `%s`. Expected %d and got %d' % (method_name, len(names), len(ret)))             # <<<<<<<<<<<<<<
 * 
 *             results = context.results
 */
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_KjException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_15 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 113, __pyx_L1_error)
        __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 113, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_15 = PyObject_Length(__pyx_v_ret); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 113, __pyx_L1_error)
        __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 113, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_method_name);
        __Pyx_GIVEREF(__pyx_v_method_name);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_method_name);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_10);
        __pyx_t_11 = 0;
        __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_Too_many_values_returned_from_s, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 113, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        __pyx_t_9 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(0, 113, __pyx_L1_error)

        /* "capnp/lib/capnp.pyx":112
 *                 ret = (ret,)
 *             names = _find_field_order(context.results.schema.node.struct)
 *             if len(ret) > len(names):             # <<<<<<<<<<<<<<
 *                 raise KjException('Too many values returned from `%s`. Expected %d and got %d' % (method_name, len(names), len(ret)))
 * 
 */
      }

      /* "capnp/lib/capnp.pyx":115
 *                 raise KjException('Too many values returned from `%s`. Expected %d and got %d' % (method_name, len(names), len(ret)))
 * 
 *             results = context.results             # <<<<<<<<<<<<<<
 *             for arg_name, arg_val in zip(names, ret):
 *                 setattr(results, arg_name, arg_val)
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_context, __pyx_n_s_results); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 115, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_v_results = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "capnp/lib/capnp.pyx":116
 * 
 *             results = context.results
 *             for arg_name, arg_val in zip(names, ret):             # <<<<<<<<<<<<<<
 *                 setattr(results, arg_name, arg_val)
 * 
 */
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_names);
      __Pyx_GIVEREF(__pyx_v_names);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_names);
      __Pyx_INCREF(__pyx_v_ret);
      __Pyx_GIVEREF(__pyx_v_ret);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ret);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_9 = __pyx_t_5; __Pyx_INCREF(__pyx_t_9); __pyx_t_15 = 0;
        __pyx_t_14 = NULL;
      } else {
        __pyx_t_15 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_14 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 116, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_14)) {
          if (likely(PyList_CheckExact(__pyx_t_9))) {
            if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_9)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 116, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 116, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_14(__pyx_t_9);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 116, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
          PyObject* sequence = __pyx_t_5;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 116, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_2);
          #else
          __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 116, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 116, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_16 = Py_TYPE(__pyx_t_11)->tp_iternext;
          index = 0; __pyx_t_10 = __pyx_t_16(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L36_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_10);
          index = 1; __pyx_t_2 = __pyx_t_16(__pyx_t_11); if (unlikely(!__pyx_t_2)) goto __pyx_L36_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_2);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_11), 2) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
          __pyx_t_16 = NULL;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          goto __pyx_L37_unpacking_done;
          __pyx_L36_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_16 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 116, __pyx_L1_error)
          __pyx_L37_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_arg_name, __pyx_t_10);
        __pyx_t_10 = 0;
        __Pyx_XDECREF_SET(__pyx_v_arg_val, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "capnp/lib/capnp.pyx":117
 *             results = context.results
 *             for arg_name, arg_val in zip(names, ret):
 *                 setattr(results, arg_name, arg_val)             # <<<<<<<<<<<<<<
 * 
 *     return NULL
 */
        __pyx_t_17 = PyObject_SetAttr(__pyx_v_results, __pyx_v_arg_name, __pyx_v_arg_val); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 117, __pyx_L1_error)

        /* "capnp/lib/capnp.pyx":116
 * 
 *             results = context.results
 *             for arg_name, arg_val in zip(names, ret):             # <<<<<<<<<<<<<<
 *                 setattr(results, arg_name, arg_val)
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "capnp/lib/capnp.pyx":104
 *         ret = func(**params_dict)
 * 
 *         if ret is not None:             # <<<<<<<<<<<<<<
 *             if type(ret) is _VoidPromise:
 *                 return new VoidPromise(moveVoidPromise(deref((<_VoidPromise>ret).thisptr)))
 */
    }
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":119
 *                 setattr(results, arg_name, arg_val)
 * 
 *     return NULL             # <<<<<<<<<<<<<<
 * 
 * cdef api convert_array_pyobject(PyArray & arr) with gil:
 */
  __pyx_r = NULL;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":66
 *     return [f.name for f in sorted(struct_node.fields, key=_attrgetter('codeOrder'))]
 * 
 * cdef api VoidPromise * call_server_method(PyObject * _server, char * _method_name, CallContext & _context) except * with gil:             # <<<<<<<<<<<<<<
 *     server = <object>_server
 *     method_name = <object>_method_name
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp.call_server_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_server);
  __Pyx_XDECREF(__pyx_v_method_name);
  __Pyx_XDECREF(__pyx_v_context);
  __Pyx_XDECREF(__pyx_v_func);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_warning_msg);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XDECREF(__pyx_v_params_dict);
  __Pyx_XDECREF(__pyx_v_names);
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XDECREF(__pyx_v_arg_name);
  __Pyx_XDECREF(__pyx_v_arg_val);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_name);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":121
 *     return NULL
 * 
 * cdef api convert_array_pyobject(PyArray & arr) with gil:             # <<<<<<<<<<<<<<
 *     return [<object>arr[i] for i in range(arr.size())]
 * 
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_convert_array_pyobject( ::kj::Array<PyObject *> &__pyx_v_arr) {
  size_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("convert_array_pyobject", 0);

  /* "capnp/lib/capnp.pyx":122
 * 
 * cdef api convert_array_pyobject(PyArray & arr) with gil:
 *     return [<object>arr[i] for i in range(arr.size())]             # <<<<<<<<<<<<<<
 * 
 * cdef api PyPromise * extract_promise(object obj) with gil:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_arr.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;
    __pyx_t_5 = (__pyx_v_arr[__pyx_v_i]);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)((PyObject *)__pyx_t_5)))) __PYX_ERR(0, 122, __pyx_L1_error)
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":121
 *     return NULL
 * 
 * cdef api convert_array_pyobject(PyArray & arr) with gil:             # <<<<<<<<<<<<<<
 *     return [<object>arr[i] for i in range(arr.size())]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.convert_array_pyobject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":124
 *     return [<object>arr[i] for i in range(arr.size())]
 * 
 * cdef api PyPromise * extract_promise(object obj) with gil:             # <<<<<<<<<<<<<<
 *     if type(obj) is _Promise:
 *         promise = <_Promise>obj
 */

static __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise *__pyx_f_5capnp_3lib_5capnp_extract_promise(PyObject *__pyx_v_obj) {
  struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_promise = NULL;
  __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise *__pyx_v_ret;
  __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("extract_promise", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "capnp/lib/capnp.pyx":125
 * 
 * cdef api PyPromise * extract_promise(object obj) with gil:
 *     if type(obj) is _Promise:             # <<<<<<<<<<<<<<
 *         promise = <_Promise>obj
 * 
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_obj)) == ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":126
 * cdef api PyPromise * extract_promise(object obj) with gil:
 *     if type(obj) is _Promise:
 *         promise = <_Promise>obj             # <<<<<<<<<<<<<<
 * 
 *         ret = new PyPromise(promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>promise)))
 */
    __pyx_t_3 = __pyx_v_obj;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_promise = ((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":128
 *         promise = <_Promise>obj
 * 
 *         ret = new PyPromise(promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>promise)))             # <<<<<<<<<<<<<<
 *         Py_DECREF(obj)
 * 
 */
    __pyx_v_ret = new __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise(__pyx_v_promise->thisptr->attach( ::kj::heap< PyRefCounter >(((PyObject *)__pyx_v_promise))));

    /* "capnp/lib/capnp.pyx":129
 * 
 *         ret = new PyPromise(promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>promise)))
 *         Py_DECREF(obj)             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
    Py_DECREF(__pyx_v_obj);

    /* "capnp/lib/capnp.pyx":131
 *         Py_DECREF(obj)
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     return NULL
 */
    __pyx_r = __pyx_v_ret;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":125
 * 
 * cdef api PyPromise * extract_promise(object obj) with gil:
 *     if type(obj) is _Promise:             # <<<<<<<<<<<<<<
 *         promise = <_Promise>obj
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":133
 *         return ret
 * 
 *     return NULL             # <<<<<<<<<<<<<<
 * 
 * cdef api RemotePromise * extract_remote_promise(object obj) with gil:
 */
  __pyx_r = NULL;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":124
 *     return [<object>arr[i] for i in range(arr.size())]
 * 
 * cdef api PyPromise * extract_promise(object obj) with gil:             # <<<<<<<<<<<<<<
 *     if type(obj) is _Promise:
 *         promise = <_Promise>obj
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_promise);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":135
 *     return NULL
 * 
 * cdef api RemotePromise * extract_remote_promise(object obj) with gil:             # <<<<<<<<<<<<<<
 *     if type(obj) is _RemotePromise:
 *         promise = <_RemotePromise>obj
 */

static  ::capnp::RemotePromise< ::capnp::DynamicStruct> *__pyx_f_5capnp_3lib_5capnp_extract_remote_promise(PyObject *__pyx_v_obj) {
  struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_promise = NULL;
   ::capnp::RemotePromise< ::capnp::DynamicStruct> *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("extract_remote_promise", 0);
  __Pyx_INCREF(__pyx_v_obj);

  /* "capnp/lib/capnp.pyx":136
 * 
 * cdef api RemotePromise * extract_remote_promise(object obj) with gil:
 *     if type(obj) is _RemotePromise:             # <<<<<<<<<<<<<<
 *         promise = <_RemotePromise>obj
 *         promise.is_consumed = True
 */
  __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_obj)) == ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__RemotePromise));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":137
 * cdef api RemotePromise * extract_remote_promise(object obj) with gil:
 *     if type(obj) is _RemotePromise:
 *         promise = <_RemotePromise>obj             # <<<<<<<<<<<<<<
 *         promise.is_consumed = True
 * 
 */
    __pyx_t_3 = __pyx_v_obj;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_promise = ((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":138
 *     if type(obj) is _RemotePromise:
 *         promise = <_RemotePromise>obj
 *         promise.is_consumed = True             # <<<<<<<<<<<<<<
 * 
 *         return promise.thisptr # TODO:MEMORY: fix this leak
 */
    __pyx_v_promise->is_consumed = 1;

    /* "capnp/lib/capnp.pyx":140
 *         promise.is_consumed = True
 * 
 *         return promise.thisptr # TODO:MEMORY: fix this leak             # <<<<<<<<<<<<<<
 * 
 *     return NULL
 */
    __pyx_r = __pyx_v_promise->thisptr;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":136
 * 
 * cdef api RemotePromise * extract_remote_promise(object obj) with gil:
 *     if type(obj) is _RemotePromise:             # <<<<<<<<<<<<<<
 *         promise = <_RemotePromise>obj
 *         promise.is_consumed = True
 */
  }

  /* "capnp/lib/capnp.pyx":142
 *         return promise.thisptr # TODO:MEMORY: fix this leak
 * 
 *     return NULL             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "<kj/string.h>" namespace " ::kj":
 */
  __pyx_r = NULL;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":135
 *     return NULL
 * 
 * cdef api RemotePromise * extract_remote_promise(object obj) with gil:             # <<<<<<<<<<<<<<
 *     if type(obj) is _RemotePromise:
 *         promise = <_RemotePromise>obj
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_promise);
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":152
 *     String strException" ::kj::str"(capnp.Exception)
 * 
 * def _make_enum(enum_name, *sequential, **named):             # <<<<<<<<<<<<<<
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_5_make_enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_4_make_enum[] = "_make_enum(enum_name, *sequential, **named)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_5_make_enum = {"_make_enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_5_make_enum, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_4_make_enum};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_5_make_enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_enum_name = 0;
  PyObject *__pyx_v_sequential = 0;
  PyObject *__pyx_v_named = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_make_enum (wrapper)", 0);
  __pyx_v_named = PyDict_New(); if (unlikely(!__pyx_v_named)) return NULL;
  __Pyx_GOTREF(__pyx_v_named);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_sequential = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_sequential)) {
      __Pyx_DECREF(__pyx_v_named); __pyx_v_named = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_sequential);
  } else {
    __pyx_v_sequential = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_enum_name,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enum_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_named, values, used_pos_args, "_make_enum") < 0)) __PYX_ERR(0, 152, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_enum_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_make_enum", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 152, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_sequential); __pyx_v_sequential = 0;
  __Pyx_DECREF(__pyx_v_named); __pyx_v_named = 0;
  __Pyx_AddTraceback("capnp.lib.capnp._make_enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_4_make_enum(__pyx_self, __pyx_v_enum_name, __pyx_v_sequential, __pyx_v_named);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_sequential);
  __Pyx_XDECREF(__pyx_v_named);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_10_make_enum_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":154
 * def _make_enum(enum_name, *sequential, **named):
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())             # <<<<<<<<<<<<<<
 *     enums['reverse_mapping'] = reverse
 *     return type(enum_name, (), enums)
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_10_make_enum_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 154, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_10_make_enum_2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_make_enum_locals_genexpr, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._make_enum.genexpr", __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_5capnp_3lib_5capnp_10_make_enum_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 154, __pyx_L1_error)
  __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);
  __pyx_t_2 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_enums)) { __Pyx_RaiseClosureNameError("enums"); __PYX_ERR(0, 154, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_enums == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
    __PYX_ERR(0, 154, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_enums, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_value);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_value, (PyObject*)__pyx_cur_scope->__pyx_v_key))) __PYX_ERR(0, 154, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":152
 *     String strException" ::kj::str"(capnp.Exception)
 * 
 * def _make_enum(enum_name, *sequential, **named):             # <<<<<<<<<<<<<<
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_4_make_enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_enum_name, PyObject *__pyx_v_sequential, PyObject *__pyx_v_named) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *__pyx_cur_scope;
  PyObject *__pyx_v_reverse = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_make_enum", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct___make_enum(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct___make_enum, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 152, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "capnp/lib/capnp.pyx":153
 * 
 * def _make_enum(enum_name, *sequential, **named):
 *     enums = dict(zip(sequential, range(len(sequential))), **named)             # <<<<<<<<<<<<<<
 *     reverse = dict((value, key) for key, value in enums.iteritems())
 *     enums['reverse_mapping'] = reverse
 */
  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_sequential); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 153, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_sequential);
  __Pyx_GIVEREF(__pyx_v_sequential);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sequential);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyDict_Type)), __pyx_t_2, __pyx_v_named); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_enums = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":154
 * def _make_enum(enum_name, *sequential, **named):
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())             # <<<<<<<<<<<<<<
 *     enums['reverse_mapping'] = reverse
 *     return type(enum_name, (), enums)
 */
  __pyx_t_3 = __pyx_pf_5capnp_3lib_5capnp_10_make_enum_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_reverse = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":155
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())
 *     enums['reverse_mapping'] = reverse             # <<<<<<<<<<<<<<
 *     return type(enum_name, (), enums)
 * 
 */
  if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_enums, __pyx_n_s_reverse_mapping, __pyx_v_reverse) < 0)) __PYX_ERR(0, 155, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":156
 *     reverse = dict((value, key) for key, value in enums.iteritems())
 *     enums['reverse_mapping'] = reverse
 *     return type(enum_name, (), enums)             # <<<<<<<<<<<<<<
 * 
 * _Type = _make_enum('_Type',
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_enum_name);
  __Pyx_GIVEREF(__pyx_v_enum_name);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_enum_name);
  __Pyx_INCREF(__pyx_empty_tuple);
  __Pyx_GIVEREF(__pyx_empty_tuple);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_empty_tuple);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_enums);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_enums);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_cur_scope->__pyx_v_enums);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyType_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":152
 *     String strException" ::kj::str"(capnp.Exception)
 * 
 * def _make_enum(enum_name, *sequential, **named):             # <<<<<<<<<<<<<<
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._make_enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_reverse);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":168
 *     cdef capnp.Exception * thisptr
 * 
 *     cdef _init(self, capnp.Exception & other):             # <<<<<<<<<<<<<<
 *         self.thisptr = new capnp.Exception(moveException(other))
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_19_KjExceptionWrapper__init(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self,  ::kj::Exception &__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":169
 * 
 *     cdef _init(self, capnp.Exception & other):
 *         self.thisptr = new capnp.Exception(moveException(other))             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = new  ::kj::Exception(std::move(__pyx_v_other));

  /* "capnp/lib/capnp.pyx":170
 *     cdef _init(self, capnp.Exception & other):
 *         self.thisptr = new capnp.Exception(moveException(other))
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":168
 *     cdef capnp.Exception * thisptr
 * 
 *     cdef _init(self, capnp.Exception & other):             # <<<<<<<<<<<<<<
 *         self.thisptr = new capnp.Exception(moveException(other))
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":172
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper___dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":173
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     property file:
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":172
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":176
 * 
 *     property file:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <char*>self.thisptr.getFile()
 *     property line:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_4file_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_4file_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4file___get__(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4file___get__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":177
 *     property file:
 *         def __get__(self):
 *             return <char*>self.thisptr.getFile()             # <<<<<<<<<<<<<<
 *     property line:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *)__pyx_v_self->thisptr->getFile())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":176
 * 
 *     property file:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <char*>self.thisptr.getFile()
 *     property line:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._KjExceptionWrapper.file.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":179
 *             return <char*>self.thisptr.getFile()
 *     property line:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getLine()
 *     property type:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_4line_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_4line_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4line___get__(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4line___get__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":180
 *     property line:
 *         def __get__(self):
 *             return self.thisptr.getLine()             # <<<<<<<<<<<<<<
 *     property type:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->thisptr->getLine()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":179
 *             return <char*>self.thisptr.getFile()
 *     property line:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getLine()
 *     property type:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._KjExceptionWrapper.line.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":182
 *             return self.thisptr.getLine()
 *     property type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int temp = <int>self.thisptr.getType()
 *             return _Type.reverse_mapping[temp]
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4type___get__(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4type___get__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self) {
  int __pyx_v_temp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":183
 *     property type:
 *         def __get__(self):
 *             cdef int temp = <int>self.thisptr.getType()             # <<<<<<<<<<<<<<
 *             return _Type.reverse_mapping[temp]
 *     property description:
 */
  __pyx_v_temp = ((int)__pyx_v_self->thisptr->getType());

  /* "capnp/lib/capnp.pyx":184
 *         def __get__(self):
 *             cdef int temp = <int>self.thisptr.getType()
 *             return _Type.reverse_mapping[temp]             # <<<<<<<<<<<<<<
 *     property description:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_reverse_mapping); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_temp, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __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;

  /* "capnp/lib/capnp.pyx":182
 *             return self.thisptr.getLine()
 *     property type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int temp = <int>self.thisptr.getType()
 *             return _Type.reverse_mapping[temp]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._KjExceptionWrapper.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":186
 *             return _Type.reverse_mapping[temp]
 *     property description:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <char*>self.thisptr.getDescription().cStr()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_11description_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_11description_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_11description___get__(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_11description___get__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":187
 *     property description:
 *         def __get__(self):
 *             return <char*>self.thisptr.getDescription().cStr()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *)__pyx_v_self->thisptr->getDescription().cStr())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":186
 *             return _Type.reverse_mapping[temp]
 *     property description:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <char*>self.thisptr.getDescription().cStr()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._KjExceptionWrapper.description.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":189
 *             return <char*>self.thisptr.getDescription().cStr()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>strException(deref(self.thisptr)).cStr()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_2__str__(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_2__str__(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__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("__str__", 0);

  /* "capnp/lib/capnp.pyx":190
 * 
 *     def __str__(self):
 *         return <char*>strException(deref(self.thisptr)).cStr()             # <<<<<<<<<<<<<<
 * 
 * # Extension classes can't inherit from Exception, so we're going to proxy wrap kj::Exception, and forward all calls to it from this Python class
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *) ::kj::str((*__pyx_v_self->thisptr)).cStr())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":189
 *             return <char*>self.thisptr.getDescription().cStr()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>strException(deref(self.thisptr)).cStr()
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_KjExceptionWrapper_4__reduce_cython__[] = "_KjExceptionWrapper.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._KjExceptionWrapper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_KjExceptionWrapper_6__setstate_cython__[] = "_KjExceptionWrapper.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_KjExceptionWrapper_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._KjExceptionWrapper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":199
 *     Type = _make_enum('Type', **{x : x for x in _Type.reverse_mapping.values()})
 * 
 *     def __init__(self, message=None, nature=None, durability=None, wrapper=None, type=None):             # <<<<<<<<<<<<<<
 *         if wrapper is not None:
 *             self.wrapper = wrapper
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11KjException___init__[] = "KjException.__init__(self, message=None, nature=None, durability=None, wrapper=None, type=None)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_11KjException_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_11KjException_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_11KjException___init__};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_message = 0;
  PyObject *__pyx_v_nature = 0;
  PyObject *__pyx_v_durability = 0;
  PyObject *__pyx_v_wrapper = 0;
  PyObject *__pyx_v_type = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_nature,&__pyx_n_s_durability,&__pyx_n_s_wrapper,&__pyx_n_s_type,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = ((PyObject *)((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  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nature);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_durability);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wrapper);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 199, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_message = values[1];
    __pyx_v_nature = values[2];
    __pyx_v_durability = values[3];
    __pyx_v_wrapper = values[4];
    __pyx_v_type = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 199, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.KjException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11KjException___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_nature, __pyx_v_durability, __pyx_v_wrapper, __pyx_v_type);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_nature, PyObject *__pyx_v_durability, PyObject *__pyx_v_wrapper, PyObject *__pyx_v_type) {
  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("__init__", 0);

  /* "capnp/lib/capnp.pyx":200
 * 
 *     def __init__(self, message=None, nature=None, durability=None, wrapper=None, type=None):
 *         if wrapper is not None:             # <<<<<<<<<<<<<<
 *             self.wrapper = wrapper
 *             self.message = str(wrapper)
 */
  __pyx_t_1 = (__pyx_v_wrapper != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":201
 *     def __init__(self, message=None, nature=None, durability=None, wrapper=None, type=None):
 *         if wrapper is not None:
 *             self.wrapper = wrapper             # <<<<<<<<<<<<<<
 *             self.message = str(wrapper)
 *         else:
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wrapper, __pyx_v_wrapper) < 0) __PYX_ERR(0, 201, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":202
 *         if wrapper is not None:
 *             self.wrapper = wrapper
 *             self.message = str(wrapper)             # <<<<<<<<<<<<<<
 *         else:
 *             self.wrapper = None
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_wrapper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_t_3) < 0) __PYX_ERR(0, 202, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":200
 * 
 *     def __init__(self, message=None, nature=None, durability=None, wrapper=None, type=None):
 *         if wrapper is not None:             # <<<<<<<<<<<<<<
 *             self.wrapper = wrapper
 *             self.message = str(wrapper)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":204
 *             self.message = str(wrapper)
 *         else:
 *             self.wrapper = None             # <<<<<<<<<<<<<<
 *             self.message = message
 *             self.nature = nature
 */
  /*else*/ {
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_wrapper, Py_None) < 0) __PYX_ERR(0, 204, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":205
 *         else:
 *             self.wrapper = None
 *             self.message = message             # <<<<<<<<<<<<<<
 *             self.nature = nature
 *             self.durability = durability
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_v_message) < 0) __PYX_ERR(0, 205, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":206
 *             self.wrapper = None
 *             self.message = message
 *             self.nature = nature             # <<<<<<<<<<<<<<
 *             self.durability = durability
 *             self._type = type
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nature, __pyx_v_nature) < 0) __PYX_ERR(0, 206, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":207
 *             self.message = message
 *             self.nature = nature
 *             self.durability = durability             # <<<<<<<<<<<<<<
 *             self._type = type
 * 
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_durability, __pyx_v_durability) < 0) __PYX_ERR(0, 207, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":208
 *             self.nature = nature
 *             self.durability = durability
 *             self._type = type             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_type_2, __pyx_v_type) < 0) __PYX_ERR(0, 208, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":199
 *     Type = _make_enum('Type', **{x : x for x in _Type.reverse_mapping.values()})
 * 
 *     def __init__(self, message=None, nature=None, durability=None, wrapper=None, type=None):             # <<<<<<<<<<<<<<
 *         if wrapper is not None:
 *             self.wrapper = wrapper
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp.KjException.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":211
 * 
 *     @property
 *     def file(self):             # <<<<<<<<<<<<<<
 *         return self.wrapper.file
 *     @property
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_3file(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11KjException_2file[] = "KjException.file(self)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_11KjException_3file = {"file", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11KjException_3file, METH_O, __pyx_doc_5capnp_3lib_5capnp_11KjException_2file};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_3file(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("file (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11KjException_2file(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_2file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("file", 0);

  /* "capnp/lib/capnp.pyx":212
 *     @property
 *     def file(self):
 *         return self.wrapper.file             # <<<<<<<<<<<<<<
 *     @property
 *     def line(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __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;

  /* "capnp/lib/capnp.pyx":211
 * 
 *     @property
 *     def file(self):             # <<<<<<<<<<<<<<
 *         return self.wrapper.file
 *     @property
 */

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

/* "capnp/lib/capnp.pyx":214
 *         return self.wrapper.file
 *     @property
 *     def line(self):             # <<<<<<<<<<<<<<
 *         return self.wrapper.line
 *     @property
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_5line(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11KjException_4line[] = "KjException.line(self)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_11KjException_5line = {"line", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11KjException_5line, METH_O, __pyx_doc_5capnp_3lib_5capnp_11KjException_4line};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_5line(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("line (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11KjException_4line(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_4line(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("line", 0);

  /* "capnp/lib/capnp.pyx":215
 *     @property
 *     def line(self):
 *         return self.wrapper.line             # <<<<<<<<<<<<<<
 *     @property
 *     def type(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __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;

  /* "capnp/lib/capnp.pyx":214
 *         return self.wrapper.file
 *     @property
 *     def line(self):             # <<<<<<<<<<<<<<
 *         return self.wrapper.line
 *     @property
 */

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

/* "capnp/lib/capnp.pyx":217
 *         return self.wrapper.line
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self.wrapper is not None:
 *             return self.wrapper.type
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_7type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11KjException_6type[] = "KjException.type(self)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_11KjException_7type = {"type", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11KjException_7type, METH_O, __pyx_doc_5capnp_3lib_5capnp_11KjException_6type};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_7type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("type (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11KjException_6type(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_6type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("type", 0);

  /* "capnp/lib/capnp.pyx":218
 *     @property
 *     def type(self):
 *         if self.wrapper is not None:             # <<<<<<<<<<<<<<
 *             return self.wrapper.type
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":219
 *     def type(self):
 *         if self.wrapper is not None:
 *             return self.wrapper.type             # <<<<<<<<<<<<<<
 *         else:
 *             return self._type
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":218
 *     @property
 *     def type(self):
 *         if self.wrapper is not None:             # <<<<<<<<<<<<<<
 *             return self.wrapper.type
 *         else:
 */
  }

  /* "capnp/lib/capnp.pyx":221
 *             return self.wrapper.type
 *         else:
 *             return self._type             # <<<<<<<<<<<<<<
 *     @property
 *     def description(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_type_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":217
 *         return self.wrapper.line
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self.wrapper is not None:
 *             return self.wrapper.type
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp.KjException.type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":223
 *             return self._type
 *     @property
 *     def description(self):             # <<<<<<<<<<<<<<
 *         if self.wrapper is not None:
 *             return self.wrapper.description
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_9description(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11KjException_8description[] = "KjException.description(self)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_11KjException_9description = {"description", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11KjException_9description, METH_O, __pyx_doc_5capnp_3lib_5capnp_11KjException_8description};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_9description(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("description (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11KjException_8description(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_8description(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("description", 0);

  /* "capnp/lib/capnp.pyx":224
 *     @property
 *     def description(self):
 *         if self.wrapper is not None:             # <<<<<<<<<<<<<<
 *             return self.wrapper.description
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":225
 *     def description(self):
 *         if self.wrapper is not None:
 *             return self.wrapper.description             # <<<<<<<<<<<<<<
 *         else:
 *             return self.message
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_description); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":224
 *     @property
 *     def description(self):
 *         if self.wrapper is not None:             # <<<<<<<<<<<<<<
 *             return self.wrapper.description
 *         else:
 */
  }

  /* "capnp/lib/capnp.pyx":227
 *             return self.wrapper.description
 *         else:
 *             return self.message             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":223
 *             return self._type
 *     @property
 *     def description(self):             # <<<<<<<<<<<<<<
 *         if self.wrapper is not None:
 *             return self.wrapper.description
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp.KjException.description", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":229
 *             return self.message
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_11__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11KjException_10__str__[] = "KjException.__str__(self)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_11KjException_11__str__ = {"__str__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11KjException_11__str__, METH_O, __pyx_doc_5capnp_3lib_5capnp_11KjException_10__str__};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_11__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11KjException_10__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_10__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "capnp/lib/capnp.pyx":230
 * 
 *     def __str__(self):
 *         return self.message             # <<<<<<<<<<<<<<
 * 
 *     def _to_python(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":229
 *             return self.message
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 * 
 */

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

/* "capnp/lib/capnp.pyx":232
 *         return self.message
 * 
 *     def _to_python(self):             # <<<<<<<<<<<<<<
 *         message = self.message
 *         if self.wrapper.type == 'FAILED':
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_13_to_python(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11KjException_12_to_python[] = "KjException._to_python(self)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_11KjException_13_to_python = {"_to_python", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11KjException_13_to_python, METH_O, __pyx_doc_5capnp_3lib_5capnp_11KjException_12_to_python};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11KjException_13_to_python(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_to_python (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11KjException_12_to_python(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11KjException_12_to_python(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_python", 0);

  /* "capnp/lib/capnp.pyx":233
 * 
 *     def _to_python(self):
 *         message = self.message             # <<<<<<<<<<<<<<
 *         if self.wrapper.type == 'FAILED':
 *             if 'has no such' in self.message:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":234
 *     def _to_python(self):
 *         message = self.message
 *         if self.wrapper.type == 'FAILED':             # <<<<<<<<<<<<<<
 *             if 'has no such' in self.message:
 *                 return AttributeError(message)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wrapper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_FAILED, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":235
 *         message = self.message
 *         if self.wrapper.type == 'FAILED':
 *             if 'has no such' in self.message:             # <<<<<<<<<<<<<<
 *                 return AttributeError(message)
 *         return self
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_has_no_such, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {

      /* "capnp/lib/capnp.pyx":236
 *         if self.wrapper.type == 'FAILED':
 *             if 'has no such' in self.message:
 *                 return AttributeError(message)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_v_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "capnp/lib/capnp.pyx":235
 *         message = self.message
 *         if self.wrapper.type == 'FAILED':
 *             if 'has no such' in self.message:             # <<<<<<<<<<<<<<
 *                 return AttributeError(message)
 *         return self
 */
    }

    /* "capnp/lib/capnp.pyx":234
 *     def _to_python(self):
 *         message = self.message
 *         if self.wrapper.type == 'FAILED':             # <<<<<<<<<<<<<<
 *             if 'has no such' in self.message:
 *                 return AttributeError(message)
 */
  }

  /* "capnp/lib/capnp.pyx":237
 *             if 'has no such' in self.message:
 *                 return AttributeError(message)
 *         return self             # <<<<<<<<<<<<<<
 * 
 * cdef api object wrap_kj_exception(capnp.Exception & exception) with gil:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":232
 *         return self.message
 * 
 *     def _to_python(self):             # <<<<<<<<<<<<<<
 *         message = self.message
 *         if self.wrapper.type == 'FAILED':
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp.KjException._to_python", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":239
 *         return self
 * 
 * cdef api object wrap_kj_exception(capnp.Exception & exception) with gil:             # <<<<<<<<<<<<<<
 *     PyErr_Clear()
 *     wrapper = _KjExceptionWrapper()._init(exception)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_wrap_kj_exception( ::kj::Exception &__pyx_v_exception) {
  PyObject *__pyx_v_wrapper = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("wrap_kj_exception", 0);

  /* "capnp/lib/capnp.pyx":240
 * 
 * cdef api object wrap_kj_exception(capnp.Exception & exception) with gil:
 *     PyErr_Clear()             # <<<<<<<<<<<<<<
 *     wrapper = _KjExceptionWrapper()._init(exception)
 *     ret = KjException(wrapper=wrapper)
 */
  PyErr_Clear();

  /* "capnp/lib/capnp.pyx":241
 * cdef api object wrap_kj_exception(capnp.Exception & exception) with gil:
 *     PyErr_Clear()
 *     wrapper = _KjExceptionWrapper()._init(exception)             # <<<<<<<<<<<<<<
 *     ret = KjException(wrapper=wrapper)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__KjExceptionWrapper)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__KjExceptionWrapper *)((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_t_1), __pyx_v_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_wrapper = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":242
 *     PyErr_Clear()
 *     wrapper = _KjExceptionWrapper()._init(exception)
 *     ret = KjException(wrapper=wrapper)             # <<<<<<<<<<<<<<
 * 
 *     return ret
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_wrapper, __pyx_v_wrapper) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ret = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":244
 *     ret = KjException(wrapper=wrapper)
 * 
 *     return ret             # <<<<<<<<<<<<<<
 * 
 * cdef api object wrap_kj_exception_for_reraise(capnp.Exception & exception) with gil:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":239
 *         return self
 * 
 * cdef api object wrap_kj_exception(capnp.Exception & exception) with gil:             # <<<<<<<<<<<<<<
 *     PyErr_Clear()
 *     wrapper = _KjExceptionWrapper()._init(exception)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp.wrap_kj_exception", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrapper);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":246
 *     return ret
 * 
 * cdef api object wrap_kj_exception_for_reraise(capnp.Exception & exception) with gil:             # <<<<<<<<<<<<<<
 *     wrapper = _KjExceptionWrapper()._init(exception)
 * 
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_wrap_kj_exception_for_reraise( ::kj::Exception &__pyx_v_exception) {
  PyObject *__pyx_v_wrapper = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("wrap_kj_exception_for_reraise", 0);

  /* "capnp/lib/capnp.pyx":247
 * 
 * cdef api object wrap_kj_exception_for_reraise(capnp.Exception & exception) with gil:
 *     wrapper = _KjExceptionWrapper()._init(exception)             # <<<<<<<<<<<<<<
 * 
 *     ret = KjException(wrapper=wrapper)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__KjExceptionWrapper)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__KjExceptionWrapper *)((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *)__pyx_t_1), __pyx_v_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_wrapper = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":249
 *     wrapper = _KjExceptionWrapper()._init(exception)
 * 
 *     ret = KjException(wrapper=wrapper)             # <<<<<<<<<<<<<<
 *     return ret
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_wrapper, __pyx_v_wrapper) < 0) __PYX_ERR(0, 249, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ret = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":250
 * 
 *     ret = KjException(wrapper=wrapper)
 *     return ret             # <<<<<<<<<<<<<<
 * 
 * cdef api object get_exception_info(object exc_type, object exc_obj, object exc_tb) with gil:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":246
 *     return ret
 * 
 * cdef api object wrap_kj_exception_for_reraise(capnp.Exception & exception) with gil:             # <<<<<<<<<<<<<<
 *     wrapper = _KjExceptionWrapper()._init(exception)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp.wrap_kj_exception_for_reraise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrapper);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":252
 *     return ret
 * 
 * cdef api object get_exception_info(object exc_type, object exc_obj, object exc_tb) with gil:             # <<<<<<<<<<<<<<
 *     try:
 *         return (exc_tb.tb_frame.f_code.co_filename.encode(), exc_tb.tb_lineno, (repr(exc_type) + ':' + str(exc_obj)).encode())
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_get_exception_info(PyObject *__pyx_v_exc_type, PyObject *__pyx_v_exc_obj, PyObject *__pyx_v_exc_tb) {
  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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("get_exception_info", 0);
  __Pyx_INCREF(__pyx_v_exc_type);
  __Pyx_INCREF(__pyx_v_exc_obj);
  __Pyx_INCREF(__pyx_v_exc_tb);

  /* "capnp/lib/capnp.pyx":253
 * 
 * cdef api object get_exception_info(object exc_type, object exc_obj, object exc_tb) with gil:
 *     try:             # <<<<<<<<<<<<<<
 *         return (exc_tb.tb_frame.f_code.co_filename.encode(), exc_tb.tb_lineno, (repr(exc_type) + ':' + str(exc_obj)).encode())
 *     except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":254
 * cdef api object get_exception_info(object exc_type, object exc_obj, object exc_tb) with gil:
 *     try:
 *         return (exc_tb.tb_frame.f_code.co_filename.encode(), exc_tb.tb_lineno, (repr(exc_type) + ':' + str(exc_obj)).encode())             # <<<<<<<<<<<<<<
 *     except:
 *         return (b'', 0, b"Couldn't determine python exception")
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_tb, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_f_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L3_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_co_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc_tb, __pyx_n_s_tb_lineno); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_Repr(__pyx_v_exc_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_exc_obj); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && 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);
        }
      }
      __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 254, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
      __pyx_t_4 = 0;
      __pyx_t_6 = 0;
      __pyx_t_5 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":253
 * 
 * cdef api object get_exception_info(object exc_type, object exc_obj, object exc_tb) with gil:
 *     try:             # <<<<<<<<<<<<<<
 *         return (exc_tb.tb_frame.f_code.co_filename.encode(), exc_tb.tb_lineno, (repr(exc_type) + ':' + str(exc_obj)).encode())
 *     except:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":255
 *     try:
 *         return (exc_tb.tb_frame.f_code.co_filename.encode(), exc_tb.tb_lineno, (repr(exc_type) + ':' + str(exc_obj)).encode())
 *     except:             # <<<<<<<<<<<<<<
 *         return (b'', 0, b"Couldn't determine python exception")
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("capnp.lib.capnp.get_exception_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 255, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);

      /* "capnp/lib/capnp.pyx":256
 *         return (exc_tb.tb_frame.f_code.co_filename.encode(), exc_tb.tb_lineno, (repr(exc_type) + ':' + str(exc_obj)).encode())
 *     except:
 *         return (b'', 0, b"Couldn't determine python exception")             # <<<<<<<<<<<<<<
 * 
 * cdef schema_cpp.ReaderOptions make_reader_opts(traversal_limit_in_words, nesting_limit) with gil:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_tuple__5);
      __pyx_r = __pyx_tuple__5;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":253
 * 
 * cdef api object get_exception_info(object exc_type, object exc_obj, object exc_tb) with gil:
 *     try:             # <<<<<<<<<<<<<<
 *         return (exc_tb.tb_frame.f_code.co_filename.encode(), exc_tb.tb_lineno, (repr(exc_type) + ':' + str(exc_obj)).encode())
 *     except:
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":252
 *     return ret
 * 
 * cdef api object get_exception_info(object exc_type, object exc_obj, object exc_tb) with gil:             # <<<<<<<<<<<<<<
 *     try:
 *         return (exc_tb.tb_frame.f_code.co_filename.encode(), exc_tb.tb_lineno, (repr(exc_type) + ':' + str(exc_obj)).encode())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("capnp.lib.capnp.get_exception_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_exc_type);
  __Pyx_XDECREF(__pyx_v_exc_obj);
  __Pyx_XDECREF(__pyx_v_exc_tb);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":258
 *         return (b'', 0, b"Couldn't determine python exception")
 * 
 * cdef schema_cpp.ReaderOptions make_reader_opts(traversal_limit_in_words, nesting_limit) with gil:             # <<<<<<<<<<<<<<
 *     cdef schema_cpp.ReaderOptions opts
 *     if traversal_limit_in_words is not None:
 */

static  ::capnp::ReaderOptions __pyx_f_5capnp_3lib_5capnp_make_reader_opts(PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
   ::capnp::ReaderOptions __pyx_v_opts;
   ::capnp::ReaderOptions __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  uint64_t __pyx_t_3;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("make_reader_opts", 0);
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_INCREF(__pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":260
 * cdef schema_cpp.ReaderOptions make_reader_opts(traversal_limit_in_words, nesting_limit) with gil:
 *     cdef schema_cpp.ReaderOptions opts
 *     if traversal_limit_in_words is not None:             # <<<<<<<<<<<<<<
 *         opts.traversalLimitInWords = traversal_limit_in_words
 *     if nesting_limit is not None:
 */
  __pyx_t_1 = (__pyx_v_traversal_limit_in_words != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":261
 *     cdef schema_cpp.ReaderOptions opts
 *     if traversal_limit_in_words is not None:
 *         opts.traversalLimitInWords = traversal_limit_in_words             # <<<<<<<<<<<<<<
 *     if nesting_limit is not None:
 *         opts.nestingLimit = nesting_limit
 */
    __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_v_traversal_limit_in_words); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L1_error)
    __pyx_v_opts.traversalLimitInWords = __pyx_t_3;

    /* "capnp/lib/capnp.pyx":260
 * cdef schema_cpp.ReaderOptions make_reader_opts(traversal_limit_in_words, nesting_limit) with gil:
 *     cdef schema_cpp.ReaderOptions opts
 *     if traversal_limit_in_words is not None:             # <<<<<<<<<<<<<<
 *         opts.traversalLimitInWords = traversal_limit_in_words
 *     if nesting_limit is not None:
 */
  }

  /* "capnp/lib/capnp.pyx":262
 *     if traversal_limit_in_words is not None:
 *         opts.traversalLimitInWords = traversal_limit_in_words
 *     if nesting_limit is not None:             # <<<<<<<<<<<<<<
 *         opts.nestingLimit = nesting_limit
 *     return opts
 */
  __pyx_t_2 = (__pyx_v_nesting_limit != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":263
 *         opts.traversalLimitInWords = traversal_limit_in_words
 *     if nesting_limit is not None:
 *         opts.nestingLimit = nesting_limit             # <<<<<<<<<<<<<<
 *     return opts
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_v_nesting_limit); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 263, __pyx_L1_error)
    __pyx_v_opts.nestingLimit = __pyx_t_4;

    /* "capnp/lib/capnp.pyx":262
 *     if traversal_limit_in_words is not None:
 *         opts.traversalLimitInWords = traversal_limit_in_words
 *     if nesting_limit is not None:             # <<<<<<<<<<<<<<
 *         opts.nestingLimit = nesting_limit
 *     return opts
 */
  }

  /* "capnp/lib/capnp.pyx":264
 *     if nesting_limit is not None:
 *         opts.nestingLimit = nesting_limit
 *     return opts             # <<<<<<<<<<<<<<
 * 
 * ctypedef fused _DynamicStructReaderOrBuilder:
 */
  __pyx_r = __pyx_v_opts;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":258
 *         return (b'', 0, b"Couldn't determine python exception")
 * 
 * cdef schema_cpp.ReaderOptions make_reader_opts(traversal_limit_in_words, nesting_limit) with gil:             # <<<<<<<<<<<<<<
 *     cdef schema_cpp.ReaderOptions opts
 *     if traversal_limit_in_words is not None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("capnp.lib.capnp.make_reader_opts", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_traversal_limit_in_words);
  __Pyx_XDECREF(__pyx_v_nesting_limit);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":316
 * cdef class _NodeReader:
 *     cdef C_Node.Reader thisptr
 *     cdef init(self, C_Node.Reader other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_11_NodeReader_init(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self,  ::capnp::schema::Node::Reader __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init", 0);

  /* "capnp/lib/capnp.pyx":317
 *     cdef C_Node.Reader thisptr
 *     cdef init(self, C_Node.Reader other):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":318
 *     cdef init(self, C_Node.Reader other):
 *         self.thisptr = other
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property displayName:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":316
 * cdef class _NodeReader:
 *     cdef C_Node.Reader thisptr
 *     cdef init(self, C_Node.Reader other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":321
 * 
 *     property displayName:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <char*>self.thisptr.getDisplayName().cStr()
 *     property scopeId:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_11displayName_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_11displayName_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader_11displayName___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_11displayName___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":322
 *     property displayName:
 *         def __get__(self):
 *             return <char*>self.thisptr.getDisplayName().cStr()             # <<<<<<<<<<<<<<
 *     property scopeId:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *)__pyx_v_self->thisptr.getDisplayName().cStr())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":321
 * 
 *     property displayName:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <char*>self.thisptr.getDisplayName().cStr()
 *     property scopeId:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.displayName.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":324
 *             return <char*>self.thisptr.getDisplayName().cStr()
 *     property scopeId:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getScopeId()
 *     property id:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_7scopeId_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_7scopeId_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader_7scopeId___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_7scopeId___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":325
 *     property scopeId:
 *         def __get__(self):
 *             return self.thisptr.getScopeId()             # <<<<<<<<<<<<<<
 *     property id:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->thisptr.getScopeId()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":324
 *             return <char*>self.thisptr.getDisplayName().cStr()
 *     property scopeId:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getScopeId()
 *     property id:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.scopeId.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":327
 *             return self.thisptr.getScopeId()
 *     property id:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getId()
 *     property nestedNodes:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader_2id___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_2id___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":328
 *     property id:
 *         def __get__(self):
 *             return self.thisptr.getId()             # <<<<<<<<<<<<<<
 *     property nestedNodes:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->thisptr.getId()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":327
 *             return self.thisptr.getScopeId()
 *     property id:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getId()
 *     property nestedNodes:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":330
 *             return self.thisptr.getId()
 *     property nestedNodes:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _List_NestedNode_Reader()._init(self.thisptr.getNestedNodes())
 *     property isStruct:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_11nestedNodes_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_11nestedNodes_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader_11nestedNodes___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_11nestedNodes___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__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("__get__", 0);

  /* "capnp/lib/capnp.pyx":331
 *     property nestedNodes:
 *         def __get__(self):
 *             return _List_NestedNode_Reader()._init(self.thisptr.getNestedNodes())             # <<<<<<<<<<<<<<
 *     property isStruct:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__List_NestedNode_Reader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__List_NestedNode_Reader *)((struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *)__pyx_t_1), __pyx_v_self->thisptr.getNestedNodes()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __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;

  /* "capnp/lib/capnp.pyx":330
 *             return self.thisptr.getId()
 *     property nestedNodes:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _List_NestedNode_Reader()._init(self.thisptr.getNestedNodes())
 *     property isStruct:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.nestedNodes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":333
 *             return _List_NestedNode_Reader()._init(self.thisptr.getNestedNodes())
 *     property isStruct:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.isStruct()
 *     property isConst:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_8isStruct_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_8isStruct_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader_8isStruct___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_8isStruct___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":334
 *     property isStruct:
 *         def __get__(self):
 *             return self.thisptr.isStruct()             # <<<<<<<<<<<<<<
 *     property isConst:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->thisptr.isStruct()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":333
 *             return _List_NestedNode_Reader()._init(self.thisptr.getNestedNodes())
 *     property isStruct:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.isStruct()
 *     property isConst:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.isStruct.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":336
 *             return self.thisptr.isStruct()
 *     property isConst:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.isConst()
 *     property isInterface:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_7isConst_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_7isConst_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader_7isConst___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_7isConst___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":337
 *     property isConst:
 *         def __get__(self):
 *             return self.thisptr.isConst()             # <<<<<<<<<<<<<<
 *     property isInterface:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->thisptr.isConst()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":336
 *             return self.thisptr.isStruct()
 *     property isConst:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.isConst()
 *     property isInterface:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.isConst.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":339
 *             return self.thisptr.isConst()
 *     property isInterface:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.isInterface()
 *     property isEnum:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_11isInterface_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_11isInterface_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader_11isInterface___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_11isInterface___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":340
 *     property isInterface:
 *         def __get__(self):
 *             return self.thisptr.isInterface()             # <<<<<<<<<<<<<<
 *     property isEnum:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->thisptr.isInterface()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":339
 *             return self.thisptr.isConst()
 *     property isInterface:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.isInterface()
 *     property isEnum:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.isInterface.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":342
 *             return self.thisptr.isInterface()
 *     property isEnum:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.isEnum()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_6isEnum_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_6isEnum_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader_6isEnum___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_6isEnum___get__(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":343
 *     property isEnum:
 *         def __get__(self):
 *             return self.thisptr.isEnum()             # <<<<<<<<<<<<<<
 * 
 * cdef class _NestedNodeReader:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->thisptr.isEnum()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":342
 *             return self.thisptr.isInterface()
 *     property isEnum:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.isEnum()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.isEnum.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_NodeReader___reduce_cython__[] = "_NodeReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader___reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_NodeReader_2__setstate_cython__[] = "_NodeReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_NodeReader_2__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_NodeReader_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NodeReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":347
 * cdef class _NestedNodeReader:
 *     cdef C_Node.NestedNode.Reader thisptr
 *     cdef init(self, C_Node.NestedNode.Reader other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_17_NestedNodeReader_init(struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__pyx_v_self,  ::capnp::schema::Node::NestedNode::Reader __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init", 0);

  /* "capnp/lib/capnp.pyx":348
 *     cdef C_Node.NestedNode.Reader thisptr
 *     cdef init(self, C_Node.NestedNode.Reader other):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":349
 *     cdef init(self, C_Node.NestedNode.Reader other):
 *         self.thisptr = other
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property name:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":347
 * cdef class _NestedNodeReader:
 *     cdef C_Node.NestedNode.Reader thisptr
 *     cdef init(self, C_Node.NestedNode.Reader other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":352
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <char*>self.thisptr.getName().cStr()
 *     property id:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader_4name___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader_4name___get__(struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":353
 *     property name:
 *         def __get__(self):
 *             return <char*>self.thisptr.getName().cStr()             # <<<<<<<<<<<<<<
 *     property id:
 *         def __get__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *)__pyx_v_self->thisptr.getName().cStr())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":352
 * 
 *     property name:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <char*>self.thisptr.getName().cStr()
 *     property id:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NestedNodeReader.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":355
 *             return <char*>self.thisptr.getName().cStr()
 *     property id:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getId()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_2id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader_2id___get__(((struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader_2id___get__(struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":356
 *     property id:
 *         def __get__(self):
 *             return self.thisptr.getId()             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicListReader:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->thisptr.getId()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":355
 *             return <char*>self.thisptr.getName().cStr()
 *     property id:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getId()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NestedNodeReader.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_17_NestedNodeReader___reduce_cython__[] = "_NestedNodeReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader___reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NestedNodeReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_17_NestedNodeReader_2__setstate_cython__[] = "_NestedNodeReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader_2__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_NestedNodeReader_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._NestedNodeReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":376
 *     cdef C_DynamicList.Reader thisptr
 *     cdef public object _parent
 *     cdef _init(self, C_DynamicList.Reader other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_18_DynamicListReader__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self,  ::capnp::DynamicList::Reader __pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":377
 *     cdef public object _parent
 *     cdef _init(self, C_DynamicList.Reader other, object parent):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":378
 *     cdef _init(self, C_DynamicList.Reader other, object parent):
 *         self.thisptr = other
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":379
 *         self.thisptr = other
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get(self, int64_t index):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":376
 *     cdef C_DynamicList.Reader thisptr
 *     cdef public object _parent
 *     cdef _init(self, C_DynamicList.Reader other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":381
 *         return self
 * 
 *     cpdef _get(self, int64_t index):             # <<<<<<<<<<<<<<
 *         return to_python_reader(self.thisptr[index], self._parent)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_1_get(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_18_DynamicListReader__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, int64_t __pyx_v_index, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
   ::capnp::DynamicValue::Reader __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_1_get)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __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_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":382
 * 
 *     cpdef _get(self, int64_t index):
 *         return to_python_reader(self.thisptr[index], self._parent)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int64_t index):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_6 = __pyx_v_self->thisptr[__pyx_v_index];
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 382, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5capnp_3lib_5capnp_to_python_reader((( ::capnp::DynamicValue::Reader)__pyx_t_6), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __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;

  /* "capnp/lib/capnp.pyx":381
 *         return self
 * 
 *     cpdef _get(self, int64_t index):             # <<<<<<<<<<<<<<
 *         return to_python_reader(self.thisptr[index], self._parent)
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListReader._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_1_get(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_18_DynamicListReader__get[] = "_DynamicListReader._get(self, int64_t index)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_1_get(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
  int64_t __pyx_v_index;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  assert(__pyx_arg_index); {
    __pyx_v_index = __Pyx_PyInt_As_int64_t(__pyx_arg_index); if (unlikely((__pyx_v_index == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 381, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListReader._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader__get(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self), ((int64_t)__pyx_v_index));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, int64_t __pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_18_DynamicListReader__get(__pyx_v_self, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __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("capnp.lib.capnp._DynamicListReader._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":384
 *         return to_python_reader(self.thisptr[index], self._parent)
 * 
 *     def __getitem__(self, int64_t index):             # <<<<<<<<<<<<<<
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
  int64_t __pyx_v_index;
  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_index); {
    __pyx_v_index = __Pyx_PyInt_As_int64_t(__pyx_arg_index); if (unlikely((__pyx_v_index == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 384, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListReader.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_2__getitem__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self), ((int64_t)__pyx_v_index));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_2__getitem__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, int64_t __pyx_v_index) {
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "capnp/lib/capnp.pyx":385
 * 
 *     def __getitem__(self, int64_t index):
 *         cdef uint size = self.thisptr.size()             # <<<<<<<<<<<<<<
 *         if index >= size:
 *             raise IndexError('Out of bounds')
 */
  __pyx_v_size = __pyx_v_self->thisptr.size();

  /* "capnp/lib/capnp.pyx":386
 *     def __getitem__(self, int64_t index):
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:             # <<<<<<<<<<<<<<
 *             raise IndexError('Out of bounds')
 *         index = index % size
 */
  __pyx_t_1 = ((__pyx_v_index >= __pyx_v_size) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":387
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:
 *             raise IndexError('Out of bounds')             # <<<<<<<<<<<<<<
 *         index = index % size
 *         return self._get(index)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 387, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":386
 *     def __getitem__(self, int64_t index):
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:             # <<<<<<<<<<<<<<
 *             raise IndexError('Out of bounds')
 *         index = index % size
 */
  }

  /* "capnp/lib/capnp.pyx":388
 *         if index >= size:
 *             raise IndexError('Out of bounds')
 *         index = index % size             # <<<<<<<<<<<<<<
 *         return self._get(index)
 * 
 */
  if (unlikely(__pyx_v_size == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(0, 388, __pyx_L1_error)
  }
  __pyx_v_index = __Pyx_mod_int64_t(__pyx_v_index, __pyx_v_size);

  /* "capnp/lib/capnp.pyx":389
 *             raise IndexError('Out of bounds')
 *         index = index % size
 *         return self._get(index)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_index, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":384
 *         return to_python_reader(self.thisptr[index], self._parent)
 * 
 *     def __getitem__(self, int64_t index):             # <<<<<<<<<<<<<<
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListReader.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":391
 *         return self._get(index)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.size()
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_5__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_5__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_4__len__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self));

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

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

  /* "capnp/lib/capnp.pyx":392
 * 
 *     def __len__(self):
 *         return self.thisptr.size()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_r = __pyx_v_self->thisptr.size();
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":391
 *         return self._get(index)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.size()
 * 
 */

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

/* "capnp/lib/capnp.pyx":394
 *         return self.thisptr.size()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>printListReader(self.thisptr).flatten().cStr()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_6__str__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_6__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
   ::kj::StringTree __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "capnp/lib/capnp.pyx":395
 * 
 *     def __str__(self):
 *         return <char*>printListReader(self.thisptr).flatten().cStr()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 =  ::capnp::prettyPrint(__pyx_v_self->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 395, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyStr_FromString(((char *)__pyx_t_1.flatten().cStr())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":394
 *         return self.thisptr.size()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>printListReader(self.thisptr).flatten().cStr()
 * 
 */

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

/* "capnp/lib/capnp.pyx":397
 *         return <char*>printListReader(self.thisptr).flatten().cStr()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         # TODO:  Print the list type.
 *         return '<capnp list reader %s>' % <char*>strListReader(self.thisptr).cStr()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_8__repr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_8__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__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);

  /* "capnp/lib/capnp.pyx":399
 *     def __repr__(self):
 *         # TODO:  Print the list type.
 *         return '<capnp list reader %s>' % <char*>strListReader(self.thisptr).cStr()             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicResizableListBuilder:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *) ::kj::str(__pyx_v_self->thisptr).cStr())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_capnp_list_reader_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __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;

  /* "capnp/lib/capnp.pyx":397
 *         return <char*>printListReader(self.thisptr).flatten().cStr()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         # TODO:  Print the list type.
 *         return '<capnp list reader %s>' % <char*>strListReader(self.thisptr).cStr()
 */

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

/* "capnp/lib/capnp.pyx":375
 *     """
 *     cdef C_DynamicList.Reader thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 *     cdef _init(self, C_DynamicList.Reader other, object parent):
 *         self.thisptr = other
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_18_DynamicListReader_10__reduce_cython__[] = "_DynamicListReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_10__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_18_DynamicListReader_12__setstate_cython__[] = "_DynamicListReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_12__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_DynamicListReader_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":425
 *     cdef public object _parent, _message, _field, _schema
 *     cdef public list _list
 *     def __init__(self, parent, field, schema):             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         self._message = parent._parent
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_parent = 0;
  PyObject *__pyx_v_field = 0;
  PyObject *__pyx_v_schema = 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_parent,&__pyx_n_s_field,&__pyx_n_s_schema,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parent)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 425, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 425, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_parent = values[0];
    __pyx_v_field = values[1];
    __pyx_v_schema = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 425, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicResizableListBuilder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder___init__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self), __pyx_v_parent, __pyx_v_field, __pyx_v_schema);

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder___init__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_parent, PyObject *__pyx_v_field, PyObject *__pyx_v_schema) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":426
 *     cdef public list _list
 *     def __init__(self, parent, field, schema):
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         self._message = parent._parent
 *         self._field = field
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":427
 *     def __init__(self, parent, field, schema):
 *         self._parent = parent
 *         self._message = parent._parent             # <<<<<<<<<<<<<<
 *         self._field = field
 *         self._schema = schema
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_parent_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_message);
  __Pyx_DECREF(__pyx_v_self->_message);
  __pyx_v_self->_message = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":428
 *         self._parent = parent
 *         self._message = parent._parent
 *         self._field = field             # <<<<<<<<<<<<<<
 *         self._schema = schema
 * 
 */
  __Pyx_INCREF(__pyx_v_field);
  __Pyx_GIVEREF(__pyx_v_field);
  __Pyx_GOTREF(__pyx_v_self->_field);
  __Pyx_DECREF(__pyx_v_self->_field);
  __pyx_v_self->_field = __pyx_v_field;

  /* "capnp/lib/capnp.pyx":429
 *         self._message = parent._parent
 *         self._field = field
 *         self._schema = schema             # <<<<<<<<<<<<<<
 * 
 *         self._list = list()
 */
  __Pyx_INCREF(__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_v_schema);
  __Pyx_GOTREF(__pyx_v_self->_schema);
  __Pyx_DECREF(__pyx_v_self->_schema);
  __pyx_v_self->_schema = __pyx_v_schema;

  /* "capnp/lib/capnp.pyx":431
 *         self._schema = schema
 * 
 *         self._list = list()             # <<<<<<<<<<<<<<
 * 
 *     cpdef add(self):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_list);
  __Pyx_DECREF(__pyx_v_self->_list);
  __pyx_v_self->_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":425
 *     cdef public object _parent, _message, _field, _schema
 *     cdef public list _list
 *     def __init__(self, parent, field, schema):             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         self._message = parent._parent
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicResizableListBuilder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":433
 *         self._list = list()
 * 
 *     cpdef add(self):             # <<<<<<<<<<<<<<
 *         """A method for adding a new struct to the list
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_3add(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_add(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_orphan = NULL;
  PyObject *__pyx_v_orphan_val = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_3add)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":440
 *         :rtype: :class:`_DynamicStructBuilder`
 *         """
 *         orphan = self._message.new_orphan(self._schema)             # <<<<<<<<<<<<<<
 *         orphan_val = orphan.get()
 *         self._list.append((orphan, orphan_val))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_message, __pyx_n_s_new_orphan); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->_schema);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_orphan = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":441
 *         """
 *         orphan = self._message.new_orphan(self._schema)
 *         orphan_val = orphan.get()             # <<<<<<<<<<<<<<
 *         self._list.append((orphan, orphan_val))
 *         return orphan_val
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_orphan, __pyx_n_s_get_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_orphan_val = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":442
 *         orphan = self._message.new_orphan(self._schema)
 *         orphan_val = orphan.get()
 *         self._list.append((orphan, orphan_val))             # <<<<<<<<<<<<<<
 *         return orphan_val
 * 
 */
  if (unlikely(__pyx_v_self->_list == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
    __PYX_ERR(0, 442, __pyx_L1_error)
  }
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_orphan);
  __Pyx_GIVEREF(__pyx_v_orphan);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_orphan);
  __Pyx_INCREF(__pyx_v_orphan_val);
  __Pyx_GIVEREF(__pyx_v_orphan_val);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_orphan_val);
  __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->_list, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":443
 *         orphan_val = orphan.get()
 *         self._list.append((orphan, orphan_val))
 *         return orphan_val             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get(self, index):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_orphan_val);
  __pyx_r = __pyx_v_orphan_val;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":433
 *         self._list = list()
 * 
 *     cpdef add(self):             # <<<<<<<<<<<<<<
 *         """A method for adding a new struct to the 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("capnp.lib.capnp._DynamicResizableListBuilder.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_orphan);
  __Pyx_XDECREF(__pyx_v_orphan_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_3add(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_2add[] = "_DynamicResizableListBuilder.add(self)\nA method for adding a new struct to the list\n\n        This will return a struct, in which you can set fields that will be reflected in the serialized Cap'n Proto message.\n\n        :rtype: :class:`_DynamicStructBuilder`\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_3add(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_2add(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_2add(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__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("add", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_add(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __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("capnp.lib.capnp._DynamicResizableListBuilder.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":445
 *         return orphan_val
 * 
 *     cpdef _get(self, index):             # <<<<<<<<<<<<<<
 *         return self._list[index][1]
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_get(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_index, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_index) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":446
 * 
 *     cpdef _get(self, index):
 *         return self._list[index][1]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_self->_list == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 446, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_list, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __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;

  /* "capnp/lib/capnp.pyx":445
 *         return orphan_val
 * 
 *     cpdef _get(self, index):             # <<<<<<<<<<<<<<
 *         return self._list[index][1]
 * 
 */

  /* 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("capnp.lib.capnp._DynamicResizableListBuilder._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_get(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_4_get[] = "_DynamicResizableListBuilder._get(self, index)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_get(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_4_get(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_index));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_4_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__get(__pyx_v_self, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __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("capnp.lib.capnp._DynamicResizableListBuilder._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":448
 *         return self._list[index][1]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         return self._list[index][1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6__getitem__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_index));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6__getitem__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_index) {
  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("__getitem__", 0);

  /* "capnp/lib/capnp.pyx":449
 * 
 *     def __getitem__(self, index):
 *         return self._list[index][1]             # <<<<<<<<<<<<<<
 * 
 *     # def __setitem__(self, index, val):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_self->_list == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 449, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_list, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __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;

  /* "capnp/lib/capnp.pyx":448
 *         return self._list[index][1]
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         return self._list[index][1]
 * 
 */

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

/* "capnp/lib/capnp.pyx":454
 *     #     self._list[index] = val
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._list)
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_9__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_9__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8__len__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8__len__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "capnp/lib/capnp.pyx":455
 * 
 *     def __len__(self):
 *         return len(self._list)             # <<<<<<<<<<<<<<
 * 
 *     def finish(self):
 */
  __pyx_t_1 = __pyx_v_self->_list;
  __Pyx_INCREF(__pyx_t_1);
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 455, __pyx_L1_error)
  }
  __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":454
 *     #     self._list[index] = val
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self._list)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicResizableListBuilder.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":457
 *         return len(self._list)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         """A method for closing this list and serializing all its members to the message
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_11finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_10finish[] = "_DynamicResizableListBuilder.finish(self)\nA method for closing this list and serializing all its members to the message\n\n        If you don't call this method, the items you previously added from this object will leak into the message, ie. inaccessible but still taking up space.\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_11finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finish (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_10finish(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_10finish(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  int __pyx_v_i;
  PyObject *__pyx_v_new_list = NULL;
  PyObject *__pyx_v_orphan = NULL;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("finish", 0);

  /* "capnp/lib/capnp.pyx":462
 *         If you don't call this method, the items you previously added from this object will leak into the message, ie. inaccessible but still taking up space.
 *         """
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         new_list = self._parent.init(self._field, len(self))
 *         for orphan, _ in self._list:
 */
  __pyx_v_i = 0;

  /* "capnp/lib/capnp.pyx":463
 *         """
 *         cdef int i = 0
 *         new_list = self._parent.init(self._field, len(self))             # <<<<<<<<<<<<<<
 *         for orphan, _ in self._list:
 *             new_list.adopt(i, orphan)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_parent, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 463, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && 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);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self->_field, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self->_field, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self->_field);
    __Pyx_GIVEREF(__pyx_v_self->_field);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->_field);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_new_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":464
 *         cdef int i = 0
 *         new_list = self._parent.init(self._field, len(self))
 *         for orphan, _ in self._list:             # <<<<<<<<<<<<<<
 *             new_list.adopt(i, orphan)
 *             i += 1
 */
  if (unlikely(__pyx_v_self->_list == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 464, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->_list; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 464, __pyx_L1_error)
    #else
    __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 464, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_5), 2) < 0) __PYX_ERR(0, 464, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 464, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_orphan, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":465
 *         new_list = self._parent.init(self._field, len(self))
 *         for orphan, _ in self._list:
 *             new_list.adopt(i, orphan)             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_list, __pyx_n_s_adopt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && 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);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_v_orphan};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_v_orphan};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_t_7);
      __Pyx_INCREF(__pyx_v_orphan);
      __Pyx_GIVEREF(__pyx_v_orphan);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_v_orphan);
      __pyx_t_7 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":466
 *         for orphan, _ in self._list:
 *             new_list.adopt(i, orphan)
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicListBuilder:
 */
    __pyx_v_i = (__pyx_v_i + 1);

    /* "capnp/lib/capnp.pyx":464
 *         cdef int i = 0
 *         new_list = self._parent.init(self._field, len(self))
 *         for orphan, _ in self._list:             # <<<<<<<<<<<<<<
 *             new_list.adopt(i, orphan)
 *             i += 1
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":457
 *         return len(self._list)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         """A method for closing this list and serializing all its members to the message
 * 
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicResizableListBuilder.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_new_list);
  __Pyx_XDECREF(__pyx_v_orphan);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":423
 *         person.write(f)
 *     """
 *     cdef public object _parent, _message, _field, _schema             # <<<<<<<<<<<<<<
 *     cdef public list _list
 *     def __init__(self, parent, field, schema):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_message);
  __pyx_r = __pyx_v_self->_message;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_message);
  __Pyx_DECREF(__pyx_v_self->_message);
  __pyx_v_self->_message = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_message);
  __Pyx_DECREF(__pyx_v_self->_message);
  __pyx_v_self->_message = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_field);
  __pyx_r = __pyx_v_self->_field;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_field);
  __Pyx_DECREF(__pyx_v_self->_field);
  __pyx_v_self->_field = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_field);
  __Pyx_DECREF(__pyx_v_self->_field);
  __pyx_v_self->_field = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_schema);
  __pyx_r = __pyx_v_self->_schema;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_schema);
  __Pyx_DECREF(__pyx_v_self->_schema);
  __pyx_v_self->_schema = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_schema);
  __Pyx_DECREF(__pyx_v_self->_schema);
  __pyx_v_self->_schema = Py_None;

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

/* "capnp/lib/capnp.pyx":424
 *     """
 *     cdef public object _parent, _message, _field, _schema
 *     cdef public list _list             # <<<<<<<<<<<<<<
 *     def __init__(self, parent, field, schema):
 *         self._parent = parent
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_list);
  __pyx_r = __pyx_v_self->_list;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 424, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_list);
  __Pyx_DECREF(__pyx_v_self->_list);
  __pyx_v_self->_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicResizableListBuilder._list.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_list);
  __Pyx_DECREF(__pyx_v_self->_list);
  __pyx_v_self->_list = ((PyObject*)Py_None);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_12__reduce_cython__[] = "_DynamicResizableListBuilder.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_12__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_12__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  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("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._field, self._list, self._message, self._parent, self._schema)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->_field);
  __Pyx_GIVEREF(__pyx_v_self->_field);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_field);
  __Pyx_INCREF(__pyx_v_self->_list);
  __Pyx_GIVEREF(__pyx_v_self->_list);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_list);
  __Pyx_INCREF(__pyx_v_self->_message);
  __Pyx_GIVEREF(__pyx_v_self->_message);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->_message);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __Pyx_GIVEREF(__pyx_v_self->_parent);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->_parent);
  __Pyx_INCREF(__pyx_v_self->_schema);
  __Pyx_GIVEREF(__pyx_v_self->_schema);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->_schema);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._field, self._list, self._message, self._parent, self._schema)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self._field, self._list, self._message, self._parent, self._schema)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._field is not None or self._list is not None or self._message is not None or self._parent is not None or self._schema is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._field, self._list, self._message, self._parent, self._schema)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._field is not None or self._list is not None or self._message is not None or self._parent is not None or self._schema is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, None), state
 */
  /*else*/ {
    __pyx_t_2 = (__pyx_v_self->_field != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->_list != ((PyObject*)Py_None));
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->_message != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->_parent != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_self->_schema != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    __pyx_t_3 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._field is not None or self._list is not None or self._message is not None or self._parent is not None or self._schema is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self._field is not None or self._list is not None or self._message is not None or self._parent is not None or self._schema is not None
 *     if use_setstate:
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__DynamicResizable); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_77509169);
    __Pyx_GIVEREF(__pyx_int_77509169);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_77509169);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._field is not None or self._list is not None or self._message is not None or self._parent is not None or self._schema is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, None), state
 *     else:
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__DynamicResizableListBuilder__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle__DynamicResizable); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_77509169);
    __Pyx_GIVEREF(__pyx_int_77509169);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_77509169);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicResizableListBuilder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__DynamicResizableListBuilder__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_14__setstate_cython__[] = "_DynamicResizableListBuilder.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_14__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_14__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__DynamicResizableListBuilder__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicResizableListBuilder__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__DynamicResizableListBuilder, (type(self), 0x49eb231, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__DynamicResizableListBuilder__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicResizableListBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":486
 *             print phone.number
 *     """
 *     cdef _init(self, C_DynamicList.Builder other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self,  ::capnp::DynamicList::Builder __pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":487
 *     """
 *     cdef _init(self, C_DynamicList.Builder other, object parent):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":488
 *     cdef _init(self, C_DynamicList.Builder other, object parent):
 *         self.thisptr = other
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":489
 *         self.thisptr = other
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get(self, int64_t index):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":486
 *             print phone.number
 *     """
 *     cdef _init(self, C_DynamicList.Builder other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":491
 *         return self
 * 
 *     cpdef _get(self, int64_t index):             # <<<<<<<<<<<<<<
 *         return to_python_builder(self.thisptr[index], self._parent)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_1_get(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, int64_t __pyx_v_index, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
   ::capnp::DynamicValue::Builder __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_1_get)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __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_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":492
 * 
 *     cpdef _get(self, int64_t index):
 *         return to_python_builder(self.thisptr[index], self._parent)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int64_t index):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_6 = __pyx_v_self->thisptr[__pyx_v_index];
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 492, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_6), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __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;

  /* "capnp/lib/capnp.pyx":491
 *         return self
 * 
 *     cpdef _get(self, int64_t index):             # <<<<<<<<<<<<<<
 *         return to_python_builder(self.thisptr[index], self._parent)
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_1_get(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder__get[] = "_DynamicListBuilder._get(self, int64_t index)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_1_get(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
  int64_t __pyx_v_index;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  assert(__pyx_arg_index); {
    __pyx_v_index = __Pyx_PyInt_As_int64_t(__pyx_arg_index); if (unlikely((__pyx_v_index == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder__get(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self), ((int64_t)__pyx_v_index));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, int64_t __pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__get(__pyx_v_self, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __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("capnp.lib.capnp._DynamicListBuilder._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":494
 *         return to_python_builder(self.thisptr[index], self._parent)
 * 
 *     def __getitem__(self, int64_t index):             # <<<<<<<<<<<<<<
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
  int64_t __pyx_v_index;
  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_index); {
    __pyx_v_index = __Pyx_PyInt_As_int64_t(__pyx_arg_index); if (unlikely((__pyx_v_index == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_2__getitem__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self), ((int64_t)__pyx_v_index));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_2__getitem__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, int64_t __pyx_v_index) {
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "capnp/lib/capnp.pyx":495
 * 
 *     def __getitem__(self, int64_t index):
 *         cdef uint size = self.thisptr.size()             # <<<<<<<<<<<<<<
 *         if index >= size:
 *             raise IndexError('Out of bounds')
 */
  __pyx_v_size = __pyx_v_self->thisptr.size();

  /* "capnp/lib/capnp.pyx":496
 *     def __getitem__(self, int64_t index):
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:             # <<<<<<<<<<<<<<
 *             raise IndexError('Out of bounds')
 *         index = index % size
 */
  __pyx_t_1 = ((__pyx_v_index >= __pyx_v_size) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":497
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:
 *             raise IndexError('Out of bounds')             # <<<<<<<<<<<<<<
 *         index = index % size
 *         return self._get(index)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 497, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":496
 *     def __getitem__(self, int64_t index):
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:             # <<<<<<<<<<<<<<
 *             raise IndexError('Out of bounds')
 *         index = index % size
 */
  }

  /* "capnp/lib/capnp.pyx":498
 *         if index >= size:
 *             raise IndexError('Out of bounds')
 *         index = index % size             # <<<<<<<<<<<<<<
 *         return self._get(index)
 * 
 */
  if (unlikely(__pyx_v_size == 0)) {
    PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    __PYX_ERR(0, 498, __pyx_L1_error)
  }
  __pyx_v_index = __Pyx_mod_int64_t(__pyx_v_index, __pyx_v_size);

  /* "capnp/lib/capnp.pyx":499
 *             raise IndexError('Out of bounds')
 *         index = index % size
 *         return self._get(index)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _set(self, index, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_index, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":494
 *         return to_python_builder(self.thisptr[index], self._parent)
 * 
 *     def __getitem__(self, int64_t index):             # <<<<<<<<<<<<<<
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":501
 *         return self._get(index)
 * 
 *     cpdef _set(self, index, value):             # <<<<<<<<<<<<<<
 *         _setDynamicField(self.thisptr, index, value, self._parent)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_5_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_5_set)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_index, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_index, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __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(__pyx_v_index);
          __Pyx_GIVEREF(__pyx_v_index);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_index);
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":502
 * 
 *     cpdef _set(self, index, value):
 *         _setDynamicField(self.thisptr, index, value, self._parent)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, index, value):
 */
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setDynamicField(__pyx_v_self->thisptr, __pyx_v_index, __pyx_v_value, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __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;

  /* "capnp/lib/capnp.pyx":501
 *         return self._get(index)
 * 
 *     cpdef _set(self, index, value):             # <<<<<<<<<<<<<<
 *         _setDynamicField(self.thisptr, index, value, self._parent)
 * 
 */

  /* 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_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_5_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_4_set[] = "_DynamicListBuilder._set(self, index, value)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_5_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_set (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_value,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_set", 1, 2, 2, 1); __PYX_ERR(0, 501, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set") < 0)) __PYX_ERR(0, 501, __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_index = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 501, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_4_set(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self), __pyx_v_index, __pyx_v_value);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_4_set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__set(__pyx_v_self, __pyx_v_index, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __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("capnp.lib.capnp._DynamicListBuilder._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":504
 *         _setDynamicField(self.thisptr, index, value, self._parent)
 * 
 *     def __setitem__(self, index, value):             # <<<<<<<<<<<<<<
 *         size = self.thisptr.size()
 *         if index >= size:
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_6__setitem__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_6__setitem__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_size = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "capnp/lib/capnp.pyx":505
 * 
 *     def __setitem__(self, index, value):
 *         size = self.thisptr.size()             # <<<<<<<<<<<<<<
 *         if index >= size:
 *             raise IndexError('Out of bounds')
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->thisptr.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_size = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":506
 *     def __setitem__(self, index, value):
 *         size = self.thisptr.size()
 *         if index >= size:             # <<<<<<<<<<<<<<
 *             raise IndexError('Out of bounds')
 *         index = index % size
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_index, __pyx_v_size, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "capnp/lib/capnp.pyx":507
 *         size = self.thisptr.size()
 *         if index >= size:
 *             raise IndexError('Out of bounds')             # <<<<<<<<<<<<<<
 *         index = index % size
 *         _setDynamicField(self.thisptr, index, value, self._parent)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __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_ERR(0, 507, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":506
 *     def __setitem__(self, index, value):
 *         size = self.thisptr.size()
 *         if index >= size:             # <<<<<<<<<<<<<<
 *             raise IndexError('Out of bounds')
 *         index = index % size
 */
  }

  /* "capnp/lib/capnp.pyx":508
 *         if index >= size:
 *             raise IndexError('Out of bounds')
 *         index = index % size             # <<<<<<<<<<<<<<
 *         _setDynamicField(self.thisptr, index, value, self._parent)
 * 
 */
  __pyx_t_1 = PyNumber_Remainder(__pyx_v_index, __pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":509
 *             raise IndexError('Out of bounds')
 *         index = index % size
 *         _setDynamicField(self.thisptr, index, value, self._parent)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = __pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setDynamicField(__pyx_v_self->thisptr, __pyx_v_index, __pyx_v_value, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":504
 *         _setDynamicField(self.thisptr, index, value, self._parent)
 * 
 *     def __setitem__(self, index, value):             # <<<<<<<<<<<<<<
 *         size = self.thisptr.size()
 *         if index >= size:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":511
 *         _setDynamicField(self.thisptr, index, value, self._parent)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.size()
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_9__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_9__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_8__len__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self));

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

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

  /* "capnp/lib/capnp.pyx":512
 * 
 *     def __len__(self):
 *         return self.thisptr.size()             # <<<<<<<<<<<<<<
 * 
 *     cpdef adopt(self, index, _DynamicOrphan orphan):
 */
  __pyx_r = __pyx_v_self->thisptr.size();
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":511
 *         _setDynamicField(self.thisptr, index, value, self._parent)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.size()
 * 
 */

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

/* "capnp/lib/capnp.pyx":514
 *         return self.thisptr.size()
 * 
 *     cpdef adopt(self, index, _DynamicOrphan orphan):             # <<<<<<<<<<<<<<
 *         """A method for adopting Cap'n Proto orphans
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_11adopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_adopt(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("adopt", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_adopt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_11adopt)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_index, ((PyObject *)__pyx_v_orphan)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_index, ((PyObject *)__pyx_v_orphan)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 514, __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(__pyx_v_index);
          __Pyx_GIVEREF(__pyx_v_index);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_index);
          __Pyx_INCREF(((PyObject *)__pyx_v_orphan));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_orphan));
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_orphan));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":527
 *         :rtype: void
 *         """
 *         self.thisptr.adopt(index, orphan.move())             # <<<<<<<<<<<<<<
 * 
 *     cpdef disown(self, index):
 */
  __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_index); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr.adopt(__pyx_t_7, ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_orphan->__pyx_vtab)->move(__pyx_v_orphan));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 527, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":514
 *         return self.thisptr.size()
 * 
 *     cpdef adopt(self, index, _DynamicOrphan orphan):             # <<<<<<<<<<<<<<
 *         """A method for adopting Cap'n Proto orphans
 * 
 */

  /* 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_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder.adopt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_11adopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_10adopt[] = "_DynamicListBuilder.adopt(self, index, _DynamicOrphan orphan)\nA method for adopting Cap'n Proto orphans\n\n        Don't use this method unless you know what you're doing. Orphans are useful for dynamically allocating objects for an unknown sized list.\n\n        :type index: int\n        :param index: The index of the element in the list to replace with the newly adopted object\n\n        :type orphan: :class:`_DynamicOrphan`\n        :param orphan: A Cap'n proto orphan to adopt. It will be unusable after this operation.\n\n        :rtype: void\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_11adopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("adopt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_orphan,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_orphan)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("adopt", 1, 2, 2, 1); __PYX_ERR(0, 514, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "adopt") < 0)) __PYX_ERR(0, 514, __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_index = values[0];
    __pyx_v_orphan = ((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("adopt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 514, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder.adopt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_orphan), __pyx_ptype_5capnp_3lib_5capnp__DynamicOrphan, 1, "orphan", 0))) __PYX_ERR(0, 514, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_10adopt(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self), __pyx_v_index, __pyx_v_orphan);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_10adopt(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan) {
  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("adopt", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_adopt(__pyx_v_self, __pyx_v_index, __pyx_v_orphan, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __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("capnp.lib.capnp._DynamicListBuilder.adopt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":529
 *         self.thisptr.adopt(index, orphan.move())
 * 
 *     cpdef disown(self, index):             # <<<<<<<<<<<<<<
 *         """A method for disowning Cap'n Proto orphans
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_13disown(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_disown(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("disown", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_disown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_13disown)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_index) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_index);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":539
 *         :rtype: :class:`_DynamicOrphan`
 *         """
 *         return _DynamicOrphan()._init(self.thisptr.disown(index), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef init(self, index, size):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicOrphan)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_v_index); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 539, __pyx_L1_error)
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_t_1), __pyx_v_self->thisptr.disown(__pyx_t_5), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":529
 *         self.thisptr.adopt(index, orphan.move())
 * 
 *     cpdef disown(self, index):             # <<<<<<<<<<<<<<
 *         """A method for disowning Cap'n Proto orphans
 * 
 */

  /* 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("capnp.lib.capnp._DynamicListBuilder.disown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_13disown(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_12disown[] = "_DynamicListBuilder.disown(self, index)\nA method for disowning Cap'n Proto orphans\n\n        Don't use this method unless you know what you're doing.\n\n        :type index: int\n        :param index: The index of the element in the list to disown\n\n        :rtype: :class:`_DynamicOrphan`\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_13disown(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("disown (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_12disown(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_index));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_12disown(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index) {
  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("disown", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_disown(__pyx_v_self, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __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("capnp.lib.capnp._DynamicListBuilder.disown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":541
 *         return _DynamicOrphan()._init(self.thisptr.disown(index), self._parent)
 * 
 *     cpdef init(self, index, size):             # <<<<<<<<<<<<<<
 *         """A method for initializing an element in a list
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_15init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_size, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_7;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_8;
   ::capnp::DynamicValue::Builder __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_15init)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_index, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_index, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __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(__pyx_v_index);
          __Pyx_GIVEREF(__pyx_v_index);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_index);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":550
 *         :param size: Size of the element to be initialized.
 *         """
 *         return to_python_builder(self.thisptr.init(index, size), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_index); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 550, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyInt_As_unsigned_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 550, __pyx_L1_error)
  try {
    __pyx_t_9 = __pyx_v_self->thisptr.init(__pyx_t_7, __pyx_t_8);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 550, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_9), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __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;

  /* "capnp/lib/capnp.pyx":541
 *         return _DynamicOrphan()._init(self.thisptr.disown(index), self._parent)
 * 
 *     cpdef init(self, index, size):             # <<<<<<<<<<<<<<
 *         """A method for initializing an element in a 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_15init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_14init[] = "_DynamicListBuilder.init(self, index, size)\nA method for initializing an element in a list\n\n        :type index: int\n        :param index: The index of the element in the list\n\n        :type size: int\n        :param size: Size of the element to be initialized.\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_15init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_size,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("init", 1, 2, 2, 1); __PYX_ERR(0, 541, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init") < 0)) __PYX_ERR(0, 541, __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_index = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("init", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 541, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_14init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self), __pyx_v_index, __pyx_v_size);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_14init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_size) {
  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("init", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_init(__pyx_v_self, __pyx_v_index, __pyx_v_size, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __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("capnp.lib.capnp._DynamicListBuilder.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":552
 *         return to_python_builder(self.thisptr.init(index, size), self._parent)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>printListBuilder(self.thisptr).flatten().cStr()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_17__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_17__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_16__str__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_16__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
   ::kj::StringTree __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "capnp/lib/capnp.pyx":553
 * 
 *     def __str__(self):
 *         return <char*>printListBuilder(self.thisptr).flatten().cStr()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 =  ::capnp::prettyPrint(__pyx_v_self->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 553, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyStr_FromString(((char *)__pyx_t_1.flatten().cStr())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":552
 *         return to_python_builder(self.thisptr.init(index, size), self._parent)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>printListBuilder(self.thisptr).flatten().cStr()
 * 
 */

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

/* "capnp/lib/capnp.pyx":555
 *         return <char*>printListBuilder(self.thisptr).flatten().cStr()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         # TODO:  Print the list type.
 *         return '<capnp list builder %s>' % <char*>strListBuilder(self.thisptr).cStr()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_19__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_19__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_18__repr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_18__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__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);

  /* "capnp/lib/capnp.pyx":557
 *     def __repr__(self):
 *         # TODO:  Print the list type.
 *         return '<capnp list builder %s>' % <char*>strListBuilder(self.thisptr).cStr()             # <<<<<<<<<<<<<<
 * 
 * cdef class _List_NestedNode_Reader:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *) ::kj::str(__pyx_v_self->thisptr).cStr())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_capnp_list_builder_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __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;

  /* "capnp/lib/capnp.pyx":555
 *         return <char*>printListBuilder(self.thisptr).flatten().cStr()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         # TODO:  Print the list type.
 *         return '<capnp list builder %s>' % <char*>strListBuilder(self.thisptr).cStr()
 */

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

/* "capnp/lib/capnp.pxd":122
 * cdef class _DynamicListBuilder:
 *     cdef C_DynamicList.Builder thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 *     cdef _init(self, C_DynamicList.Builder other, object parent)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_20__reduce_cython__[] = "_DynamicListBuilder.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_20__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_22__setstate_cython__[] = "_DynamicListBuilder.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_22__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_DynamicListBuilder_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicListBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":561
 * cdef class _List_NestedNode_Reader:
 *     cdef C_Node.NestedNode.Reader.ListNestedNodeReader thisptr
 *     cdef _init(self, List[C_Node.NestedNode].Reader other):             # <<<<<<<<<<<<<<
 *         self.thisptr = <C_Node.NestedNode.Reader.ListNestedNodeReader>other
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_23_List_NestedNode_Reader__init(struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_v_self,  ::capnp::List< ::capnp::schema::Node::NestedNode> ::Reader __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":562
 *     cdef C_Node.NestedNode.Reader.ListNestedNodeReader thisptr
 *     cdef _init(self, List[C_Node.NestedNode].Reader other):
 *         self.thisptr = <C_Node.NestedNode.Reader.ListNestedNodeReader>other             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = ((capnp::List<capnp::schema::Node::NestedNode>::Reader)__pyx_v_other);

  /* "capnp/lib/capnp.pyx":563
 *     cdef _init(self, List[C_Node.NestedNode].Reader other):
 *         self.thisptr = <C_Node.NestedNode.Reader.ListNestedNodeReader>other
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":561
 * cdef class _List_NestedNode_Reader:
 *     cdef C_Node.NestedNode.Reader.ListNestedNodeReader thisptr
 *     cdef _init(self, List[C_Node.NestedNode].Reader other):             # <<<<<<<<<<<<<<
 *         self.thisptr = <C_Node.NestedNode.Reader.ListNestedNodeReader>other
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":565
 *         return self
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         size = self.thisptr.size()
 *         if index >= size:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_1__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_1__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader___getitem__(((struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *)__pyx_v_self), ((PyObject *)__pyx_v_index));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader___getitem__(struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_size = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "capnp/lib/capnp.pyx":566
 * 
 *     def __getitem__(self, index):
 *         size = self.thisptr.size()             # <<<<<<<<<<<<<<
 *         if index >= size:
 *             raise IndexError('Out of bounds')
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->thisptr.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_size = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":567
 *     def __getitem__(self, index):
 *         size = self.thisptr.size()
 *         if index >= size:             # <<<<<<<<<<<<<<
 *             raise IndexError('Out of bounds')
 *         index = index % size
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_index, __pyx_v_size, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "capnp/lib/capnp.pyx":568
 *         size = self.thisptr.size()
 *         if index >= size:
 *             raise IndexError('Out of bounds')             # <<<<<<<<<<<<<<
 *         index = index % size
 *         return _NestedNodeReader().init(<C_Node.NestedNode.Reader>self.thisptr[index])
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __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_ERR(0, 568, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":567
 *     def __getitem__(self, index):
 *         size = self.thisptr.size()
 *         if index >= size:             # <<<<<<<<<<<<<<
 *             raise IndexError('Out of bounds')
 *         index = index % size
 */
  }

  /* "capnp/lib/capnp.pyx":569
 *         if index >= size:
 *             raise IndexError('Out of bounds')
 *         index = index % size             # <<<<<<<<<<<<<<
 *         return _NestedNodeReader().init(<C_Node.NestedNode.Reader>self.thisptr[index])
 * 
 */
  __pyx_t_1 = PyNumber_Remainder(__pyx_v_index, __pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":570
 *             raise IndexError('Out of bounds')
 *         index = index % size
 *         return _NestedNodeReader().init(<C_Node.NestedNode.Reader>self.thisptr[index])             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__NestedNodeReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_unsigned_int(__pyx_v_index); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 570, __pyx_L1_error)
  __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__NestedNodeReader *)((struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *)__pyx_t_1), (( ::capnp::schema::Node::NestedNode::Reader)(__pyx_v_self->thisptr[__pyx_t_3]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":565
 *         return self
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         size = self.thisptr.size()
 *         if index >= size:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._List_NestedNode_Reader.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":572
 *         return _NestedNodeReader().init(<C_Node.NestedNode.Reader>self.thisptr[index])
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.size()
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_3__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_3__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader_2__len__(((struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *)__pyx_v_self));

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

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

  /* "capnp/lib/capnp.pyx":573
 * 
 *     def __len__(self):
 *         return self.thisptr.size()             # <<<<<<<<<<<<<<
 * 
 * # cdef to_python_pipeline(C_DynamicValue.Pipeline self, object parent):
 */
  __pyx_r = __pyx_v_self->thisptr.size();
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":572
 *         return _NestedNodeReader().init(<C_Node.NestedNode.Reader>self.thisptr[index])
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.size()
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_23_List_NestedNode_Reader_4__reduce_cython__[] = "_List_NestedNode_Reader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._List_NestedNode_Reader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_23_List_NestedNode_Reader_6__setstate_cython__[] = "_List_NestedNode_Reader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_List_NestedNode_Reader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._List_NestedNode_Reader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":586
 * #         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 * cdef to_python_reader(C_DynamicValue.Reader self, object parent):             # <<<<<<<<<<<<<<
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_to_python_reader( ::capnp::DynamicValue::Reader __pyx_v_self, PyObject *__pyx_v_parent) {
  int __pyx_v_type;
   ::kj::StringPtr __pyx_v_temp_text;
   ::capnp::Data::Reader __pyx_v_temp_data;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_python_reader", 0);

  /* "capnp/lib/capnp.pyx":587
 * 
 * cdef to_python_reader(C_DynamicValue.Reader self, object parent):
 *     cdef int type = self.getType()             # <<<<<<<<<<<<<<
 *     if type == capnp.TYPE_BOOL:
 *         return self.asBool()
 */
  __pyx_v_type = __pyx_v_self.getType();

  /* "capnp/lib/capnp.pyx":588
 * cdef to_python_reader(C_DynamicValue.Reader self, object parent):
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:             # <<<<<<<<<<<<<<
 *         return self.asBool()
 *     elif type == capnp.TYPE_INT:
 */
  switch (__pyx_v_type) {
    case  ::capnp::DynamicValue::BOOL:

    /* "capnp/lib/capnp.pyx":589
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:
 *         return self.asBool()             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_INT:
 *         return self.asInt()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self.as<bool>()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":588
 * cdef to_python_reader(C_DynamicValue.Reader self, object parent):
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:             # <<<<<<<<<<<<<<
 *         return self.asBool()
 *     elif type == capnp.TYPE_INT:
 */
    break;
    case  ::capnp::DynamicValue::INT:

    /* "capnp/lib/capnp.pyx":591
 *         return self.asBool()
 *     elif type == capnp.TYPE_INT:
 *         return self.asInt()             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_UINT:
 *         return self.asUint()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self.as<int64_t>()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":590
 *     if type == capnp.TYPE_BOOL:
 *         return self.asBool()
 *     elif type == capnp.TYPE_INT:             # <<<<<<<<<<<<<<
 *         return self.asInt()
 *     elif type == capnp.TYPE_UINT:
 */
    break;
    case  ::capnp::DynamicValue::UINT:

    /* "capnp/lib/capnp.pyx":593
 *         return self.asInt()
 *     elif type == capnp.TYPE_UINT:
 *         return self.asUint()             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_FLOAT:
 *         return self.asDouble()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self.as<uint64_t>()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":592
 *     elif type == capnp.TYPE_INT:
 *         return self.asInt()
 *     elif type == capnp.TYPE_UINT:             # <<<<<<<<<<<<<<
 *         return self.asUint()
 *     elif type == capnp.TYPE_FLOAT:
 */
    break;
    case  ::capnp::DynamicValue::FLOAT:

    /* "capnp/lib/capnp.pyx":595
 *         return self.asUint()
 *     elif type == capnp.TYPE_FLOAT:
 *         return self.asDouble()             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_TEXT:
 *         temp_text = self.asText()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self.as<double>()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":594
 *     elif type == capnp.TYPE_UINT:
 *         return self.asUint()
 *     elif type == capnp.TYPE_FLOAT:             # <<<<<<<<<<<<<<
 *         return self.asDouble()
 *     elif type == capnp.TYPE_TEXT:
 */
    break;
    case  ::capnp::DynamicValue::TEXT:

    /* "capnp/lib/capnp.pyx":597
 *         return self.asDouble()
 *     elif type == capnp.TYPE_TEXT:
 *         temp_text = self.asText()             # <<<<<<<<<<<<<<
 *         return (<char*>temp_text.begin())[:temp_text.size()]
 *     elif type == capnp.TYPE_DATA:
 */
    __pyx_v_temp_text = __pyx_v_self.as< ::capnp::Text>();

    /* "capnp/lib/capnp.pyx":598
 *     elif type == capnp.TYPE_TEXT:
 *         temp_text = self.asText()
 *         return (<char*>temp_text.begin())[:temp_text.size()]             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_DATA:
 *         temp_data = self.asData()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(((char *)__pyx_v_temp_text.begin()) + 0, __pyx_v_temp_text.size() - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":596
 *     elif type == capnp.TYPE_FLOAT:
 *         return self.asDouble()
 *     elif type == capnp.TYPE_TEXT:             # <<<<<<<<<<<<<<
 *         temp_text = self.asText()
 *         return (<char*>temp_text.begin())[:temp_text.size()]
 */
    break;
    case  ::capnp::DynamicValue::DATA:

    /* "capnp/lib/capnp.pyx":600
 *         return (<char*>temp_text.begin())[:temp_text.size()]
 *     elif type == capnp.TYPE_DATA:
 *         temp_data = self.asData()             # <<<<<<<<<<<<<<
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])
 *     elif type == capnp.TYPE_LIST:
 */
    __pyx_v_temp_data = __pyx_v_self.as< ::capnp::Data>();

    /* "capnp/lib/capnp.pyx":601
 *     elif type == capnp.TYPE_DATA:
 *         temp_data = self.asData()
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_LIST:
 *         return _DynamicListReader()._init(self.asList(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((char *)__pyx_v_temp_data.begin()) + 0, __pyx_v_temp_data.size() - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject*)__pyx_t_1));
    __pyx_r = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":599
 *         temp_text = self.asText()
 *         return (<char*>temp_text.begin())[:temp_text.size()]
 *     elif type == capnp.TYPE_DATA:             # <<<<<<<<<<<<<<
 *         temp_data = self.asData()
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])
 */
    break;
    case  ::capnp::DynamicValue::LIST:

    /* "capnp/lib/capnp.pyx":603
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])
 *     elif type == capnp.TYPE_LIST:
 *         return _DynamicListReader()._init(self.asList(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_STRUCT:
 *         return _DynamicStructReader()._init(self.asStruct(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicListReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_t_1), __pyx_v_self.as< ::capnp::DynamicList>(), __pyx_v_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __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;

    /* "capnp/lib/capnp.pyx":602
 *         temp_data = self.asData()
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])
 *     elif type == capnp.TYPE_LIST:             # <<<<<<<<<<<<<<
 *         return _DynamicListReader()._init(self.asList(), parent)
 *     elif type == capnp.TYPE_STRUCT:
 */
    break;
    case  ::capnp::DynamicValue::STRUCT:

    /* "capnp/lib/capnp.pyx":605
 *         return _DynamicListReader()._init(self.asList(), parent)
 *     elif type == capnp.TYPE_STRUCT:
 *         return _DynamicStructReader()._init(self.asStruct(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_ENUM:
 *         return _DynamicEnum()._init(self.asEnum(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_2), __pyx_v_self.as< ::capnp::DynamicStruct>(), __pyx_v_parent, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __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;

    /* "capnp/lib/capnp.pyx":604
 *     elif type == capnp.TYPE_LIST:
 *         return _DynamicListReader()._init(self.asList(), parent)
 *     elif type == capnp.TYPE_STRUCT:             # <<<<<<<<<<<<<<
 *         return _DynamicStructReader()._init(self.asStruct(), parent)
 *     elif type == capnp.TYPE_ENUM:
 */
    break;
    case  ::capnp::DynamicValue::ENUM:

    /* "capnp/lib/capnp.pyx":607
 *         return _DynamicStructReader()._init(self.asStruct(), parent)
 *     elif type == capnp.TYPE_ENUM:
 *         return _DynamicEnum()._init(self.asEnum(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_VOID:
 *         return None
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicEnum)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnum *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_t_1), __pyx_v_self.as< ::capnp::DynamicEnum>(), __pyx_v_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __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;

    /* "capnp/lib/capnp.pyx":606
 *     elif type == capnp.TYPE_STRUCT:
 *         return _DynamicStructReader()._init(self.asStruct(), parent)
 *     elif type == capnp.TYPE_ENUM:             # <<<<<<<<<<<<<<
 *         return _DynamicEnum()._init(self.asEnum(), parent)
 *     elif type == capnp.TYPE_VOID:
 */
    break;
    case  ::capnp::DynamicValue::VOID:

    /* "capnp/lib/capnp.pyx":609
 *         return _DynamicEnum()._init(self.asEnum(), parent)
 *     elif type == capnp.TYPE_VOID:
 *         return None             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_ANY_POINTER:
 *         return _DynamicObjectReader()._init(self.asObject(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":608
 *     elif type == capnp.TYPE_ENUM:
 *         return _DynamicEnum()._init(self.asEnum(), parent)
 *     elif type == capnp.TYPE_VOID:             # <<<<<<<<<<<<<<
 *         return None
 *     elif type == capnp.TYPE_ANY_POINTER:
 */
    break;
    case  ::capnp::DynamicValue::ANY_POINTER:

    /* "capnp/lib/capnp.pyx":611
 *         return None
 *     elif type == capnp.TYPE_ANY_POINTER:
 *         return _DynamicObjectReader()._init(self.asObject(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_CAPABILITY:
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_t_2), __pyx_v_self.as< ::capnp::AnyPointer>(), __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __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;

    /* "capnp/lib/capnp.pyx":610
 *     elif type == capnp.TYPE_VOID:
 *         return None
 *     elif type == capnp.TYPE_ANY_POINTER:             # <<<<<<<<<<<<<<
 *         return _DynamicObjectReader()._init(self.asObject(), parent)
 *     elif type == capnp.TYPE_CAPABILITY:
 */
    break;
    case  ::capnp::DynamicValue::CAPABILITY:

    /* "capnp/lib/capnp.pyx":613
 *         return _DynamicObjectReader()._init(self.asObject(), parent)
 *     elif type == capnp.TYPE_CAPABILITY:
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_UNKNOWN:
 *         raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), __pyx_v_self.as< ::capnp::DynamicCapability>(), __pyx_v_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __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;

    /* "capnp/lib/capnp.pyx":612
 *     elif type == capnp.TYPE_ANY_POINTER:
 *         return _DynamicObjectReader()._init(self.asObject(), parent)
 *     elif type == capnp.TYPE_CAPABILITY:             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)
 *     elif type == capnp.TYPE_UNKNOWN:
 */
    break;
    case  ::capnp::DynamicValue::UNKNOWN:

    /* "capnp/lib/capnp.pyx":615
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)
 *     elif type == capnp.TYPE_UNKNOWN:
 *         raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")             # <<<<<<<<<<<<<<
 *     else:
 *         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_KjException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_kp_s_Cannot_convert_type_to_Python_Ty) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_Cannot_convert_type_to_Python_Ty);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 615, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":614
 *     elif type == capnp.TYPE_CAPABILITY:
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)
 *     elif type == capnp.TYPE_UNKNOWN:             # <<<<<<<<<<<<<<
 *         raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 *     else:
 */
    break;
    default:

    /* "capnp/lib/capnp.pyx":617
 *         raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 *     else:
 *         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")             # <<<<<<<<<<<<<<
 * 
 * cdef to_python_builder(C_DynamicValue.Builder self, object parent):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_KjException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_kp_s_Cannot_convert_type_to_Python_Ty_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_Cannot_convert_type_to_Python_Ty_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 617, __pyx_L1_error)
    break;
  }

  /* "capnp/lib/capnp.pyx":586
 * #         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 * cdef to_python_reader(C_DynamicValue.Reader self, object parent):             # <<<<<<<<<<<<<<
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp.to_python_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":619
 *         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 * cdef to_python_builder(C_DynamicValue.Builder self, object parent):             # <<<<<<<<<<<<<<
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_to_python_builder( ::capnp::DynamicValue::Builder __pyx_v_self, PyObject *__pyx_v_parent) {
  int __pyx_v_type;
   ::kj::StringPtr __pyx_v_temp_text;
   ::capnp::Data::Builder __pyx_v_temp_data;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_python_builder", 0);

  /* "capnp/lib/capnp.pyx":620
 * 
 * cdef to_python_builder(C_DynamicValue.Builder self, object parent):
 *     cdef int type = self.getType()             # <<<<<<<<<<<<<<
 *     if type == capnp.TYPE_BOOL:
 *         return self.asBool()
 */
  __pyx_v_type = __pyx_v_self.getType();

  /* "capnp/lib/capnp.pyx":621
 * cdef to_python_builder(C_DynamicValue.Builder self, object parent):
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:             # <<<<<<<<<<<<<<
 *         return self.asBool()
 *     elif type == capnp.TYPE_INT:
 */
  switch (__pyx_v_type) {
    case  ::capnp::DynamicValue::BOOL:

    /* "capnp/lib/capnp.pyx":622
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:
 *         return self.asBool()             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_INT:
 *         return self.asInt()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self.as<bool>()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":621
 * cdef to_python_builder(C_DynamicValue.Builder self, object parent):
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:             # <<<<<<<<<<<<<<
 *         return self.asBool()
 *     elif type == capnp.TYPE_INT:
 */
    break;
    case  ::capnp::DynamicValue::INT:

    /* "capnp/lib/capnp.pyx":624
 *         return self.asBool()
 *     elif type == capnp.TYPE_INT:
 *         return self.asInt()             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_UINT:
 *         return self.asUint()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self.as<int64_t>()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":623
 *     if type == capnp.TYPE_BOOL:
 *         return self.asBool()
 *     elif type == capnp.TYPE_INT:             # <<<<<<<<<<<<<<
 *         return self.asInt()
 *     elif type == capnp.TYPE_UINT:
 */
    break;
    case  ::capnp::DynamicValue::UINT:

    /* "capnp/lib/capnp.pyx":626
 *         return self.asInt()
 *     elif type == capnp.TYPE_UINT:
 *         return self.asUint()             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_FLOAT:
 *         return self.asDouble()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self.as<uint64_t>()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":625
 *     elif type == capnp.TYPE_INT:
 *         return self.asInt()
 *     elif type == capnp.TYPE_UINT:             # <<<<<<<<<<<<<<
 *         return self.asUint()
 *     elif type == capnp.TYPE_FLOAT:
 */
    break;
    case  ::capnp::DynamicValue::FLOAT:

    /* "capnp/lib/capnp.pyx":628
 *         return self.asUint()
 *     elif type == capnp.TYPE_FLOAT:
 *         return self.asDouble()             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_TEXT:
 *         temp_text = self.asText()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self.as<double>()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":627
 *     elif type == capnp.TYPE_UINT:
 *         return self.asUint()
 *     elif type == capnp.TYPE_FLOAT:             # <<<<<<<<<<<<<<
 *         return self.asDouble()
 *     elif type == capnp.TYPE_TEXT:
 */
    break;
    case  ::capnp::DynamicValue::TEXT:

    /* "capnp/lib/capnp.pyx":630
 *         return self.asDouble()
 *     elif type == capnp.TYPE_TEXT:
 *         temp_text = self.asText()             # <<<<<<<<<<<<<<
 *         return (<char*>temp_text.begin())[:temp_text.size()]
 *     elif type == capnp.TYPE_DATA:
 */
    __pyx_v_temp_text = __pyx_v_self.as< ::capnp::Text>();

    /* "capnp/lib/capnp.pyx":631
 *     elif type == capnp.TYPE_TEXT:
 *         temp_text = self.asText()
 *         return (<char*>temp_text.begin())[:temp_text.size()]             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_DATA:
 *         temp_data = self.asData()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(((char *)__pyx_v_temp_text.begin()) + 0, __pyx_v_temp_text.size() - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":629
 *     elif type == capnp.TYPE_FLOAT:
 *         return self.asDouble()
 *     elif type == capnp.TYPE_TEXT:             # <<<<<<<<<<<<<<
 *         temp_text = self.asText()
 *         return (<char*>temp_text.begin())[:temp_text.size()]
 */
    break;
    case  ::capnp::DynamicValue::DATA:

    /* "capnp/lib/capnp.pyx":633
 *         return (<char*>temp_text.begin())[:temp_text.size()]
 *     elif type == capnp.TYPE_DATA:
 *         temp_data = self.asData()             # <<<<<<<<<<<<<<
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])
 *     elif type == capnp.TYPE_LIST:
 */
    __pyx_v_temp_data = __pyx_v_self.as< ::capnp::Data>();

    /* "capnp/lib/capnp.pyx":634
 *     elif type == capnp.TYPE_DATA:
 *         temp_data = self.asData()
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_LIST:
 *         return _DynamicListBuilder()._init(self.asList(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((char *)__pyx_v_temp_data.begin()) + 0, __pyx_v_temp_data.size() - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject*)__pyx_t_1));
    __pyx_r = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":632
 *         temp_text = self.asText()
 *         return (<char*>temp_text.begin())[:temp_text.size()]
 *     elif type == capnp.TYPE_DATA:             # <<<<<<<<<<<<<<
 *         temp_data = self.asData()
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])
 */
    break;
    case  ::capnp::DynamicValue::LIST:

    /* "capnp/lib/capnp.pyx":636
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])
 *     elif type == capnp.TYPE_LIST:
 *         return _DynamicListBuilder()._init(self.asList(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_STRUCT:
 *         return _DynamicStructBuilder()._init(self.asStruct(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_t_1), __pyx_v_self.as< ::capnp::DynamicList>(), __pyx_v_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __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;

    /* "capnp/lib/capnp.pyx":635
 *         temp_data = self.asData()
 *         return <bytes>((<char*>temp_data.begin())[:temp_data.size()])
 *     elif type == capnp.TYPE_LIST:             # <<<<<<<<<<<<<<
 *         return _DynamicListBuilder()._init(self.asList(), parent)
 *     elif type == capnp.TYPE_STRUCT:
 */
    break;
    case  ::capnp::DynamicValue::STRUCT:

    /* "capnp/lib/capnp.pyx":638
 *         return _DynamicListBuilder()._init(self.asList(), parent)
 *     elif type == capnp.TYPE_STRUCT:
 *         return _DynamicStructBuilder()._init(self.asStruct(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_ENUM:
 *         return _DynamicEnum()._init(self.asEnum(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_2), __pyx_v_self.as< ::capnp::DynamicStruct>(), __pyx_v_parent, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __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;

    /* "capnp/lib/capnp.pyx":637
 *     elif type == capnp.TYPE_LIST:
 *         return _DynamicListBuilder()._init(self.asList(), parent)
 *     elif type == capnp.TYPE_STRUCT:             # <<<<<<<<<<<<<<
 *         return _DynamicStructBuilder()._init(self.asStruct(), parent)
 *     elif type == capnp.TYPE_ENUM:
 */
    break;
    case  ::capnp::DynamicValue::ENUM:

    /* "capnp/lib/capnp.pyx":640
 *         return _DynamicStructBuilder()._init(self.asStruct(), parent)
 *     elif type == capnp.TYPE_ENUM:
 *         return _DynamicEnum()._init(self.asEnum(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_VOID:
 *         return None
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicEnum)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnum *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_t_1), __pyx_v_self.as< ::capnp::DynamicEnum>(), __pyx_v_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __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;

    /* "capnp/lib/capnp.pyx":639
 *     elif type == capnp.TYPE_STRUCT:
 *         return _DynamicStructBuilder()._init(self.asStruct(), parent)
 *     elif type == capnp.TYPE_ENUM:             # <<<<<<<<<<<<<<
 *         return _DynamicEnum()._init(self.asEnum(), parent)
 *     elif type == capnp.TYPE_VOID:
 */
    break;
    case  ::capnp::DynamicValue::VOID:

    /* "capnp/lib/capnp.pyx":642
 *         return _DynamicEnum()._init(self.asEnum(), parent)
 *     elif type == capnp.TYPE_VOID:
 *         return None             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_ANY_POINTER:
 *         return _DynamicObjectBuilder()._init(self.asObject(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":641
 *     elif type == capnp.TYPE_ENUM:
 *         return _DynamicEnum()._init(self.asEnum(), parent)
 *     elif type == capnp.TYPE_VOID:             # <<<<<<<<<<<<<<
 *         return None
 *     elif type == capnp.TYPE_ANY_POINTER:
 */
    break;
    case  ::capnp::DynamicValue::ANY_POINTER:

    /* "capnp/lib/capnp.pyx":644
 *         return None
 *     elif type == capnp.TYPE_ANY_POINTER:
 *         return _DynamicObjectBuilder()._init(self.asObject(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_CAPABILITY:
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_t_2), __pyx_v_self.as< ::capnp::AnyPointer>(), __pyx_v_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __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;

    /* "capnp/lib/capnp.pyx":643
 *     elif type == capnp.TYPE_VOID:
 *         return None
 *     elif type == capnp.TYPE_ANY_POINTER:             # <<<<<<<<<<<<<<
 *         return _DynamicObjectBuilder()._init(self.asObject(), parent)
 *     elif type == capnp.TYPE_CAPABILITY:
 */
    break;
    case  ::capnp::DynamicValue::CAPABILITY:

    /* "capnp/lib/capnp.pyx":646
 *         return _DynamicObjectBuilder()._init(self.asObject(), parent)
 *     elif type == capnp.TYPE_CAPABILITY:
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)             # <<<<<<<<<<<<<<
 *     elif type == capnp.TYPE_UNKNOWN:
 *         raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), __pyx_v_self.as< ::capnp::DynamicCapability>(), __pyx_v_parent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __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;

    /* "capnp/lib/capnp.pyx":645
 *     elif type == capnp.TYPE_ANY_POINTER:
 *         return _DynamicObjectBuilder()._init(self.asObject(), parent)
 *     elif type == capnp.TYPE_CAPABILITY:             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)
 *     elif type == capnp.TYPE_UNKNOWN:
 */
    break;
    case  ::capnp::DynamicValue::UNKNOWN:

    /* "capnp/lib/capnp.pyx":648
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)
 *     elif type == capnp.TYPE_UNKNOWN:
 *         raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")             # <<<<<<<<<<<<<<
 *     else:
 *         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_KjException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_kp_s_Cannot_convert_type_to_Python_Ty) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_Cannot_convert_type_to_Python_Ty);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 648, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":647
 *     elif type == capnp.TYPE_CAPABILITY:
 *         return _DynamicCapabilityClient()._init(self.asCapability(), parent)
 *     elif type == capnp.TYPE_UNKNOWN:             # <<<<<<<<<<<<<<
 *         raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 *     else:
 */
    break;
    default:

    /* "capnp/lib/capnp.pyx":650
 *         raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 *     else:
 *         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")             # <<<<<<<<<<<<<<
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_struct_builder(_DynamicStructBuilder value):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_KjException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_kp_s_Cannot_convert_type_to_Python_Ty_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_Cannot_convert_type_to_Python_Ty_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 650, __pyx_L1_error)
    break;
  }

  /* "capnp/lib/capnp.pyx":619
 *         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 * cdef to_python_builder(C_DynamicValue.Builder self, object parent):             # <<<<<<<<<<<<<<
 *     cdef int type = self.getType()
 *     if type == capnp.TYPE_BOOL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp.to_python_builder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":652
 *         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_struct_builder(_DynamicStructBuilder value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr.asReader())
 * 
 */

static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_builder(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_value) {
   ::capnp::DynamicValue::Reader __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_extract_dynamic_struct_builder", 0);

  /* "capnp/lib/capnp.pyx":653
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_struct_builder(_DynamicStructBuilder value):
 *     return C_DynamicValue.Reader(value.thisptr.asReader())             # <<<<<<<<<<<<<<
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_struct_reader(_DynamicStructReader value):
 */
  __pyx_r =  ::capnp::DynamicValue::Reader(__pyx_v_value->thisptr.asReader());
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":652
 *         raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_struct_builder(_DynamicStructBuilder value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr.asReader())
 * 
 */

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

/* "capnp/lib/capnp.pyx":655
 *     return C_DynamicValue.Reader(value.thisptr.asReader())
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_struct_reader(_DynamicStructReader value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 */

static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_value) {
   ::capnp::DynamicValue::Reader __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_extract_dynamic_struct_reader", 0);

  /* "capnp/lib/capnp.pyx":656
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_struct_reader(_DynamicStructReader value):
 *     return C_DynamicValue.Reader(value.thisptr)             # <<<<<<<<<<<<<<
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_client(_DynamicCapabilityClient value):
 */
  __pyx_r =  ::capnp::DynamicValue::Reader(__pyx_v_value->thisptr);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":655
 *     return C_DynamicValue.Reader(value.thisptr.asReader())
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_struct_reader(_DynamicStructReader value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 */

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

/* "capnp/lib/capnp.pyx":658
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_client(_DynamicCapabilityClient value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 */

static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_client(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_value) {
   ::capnp::DynamicValue::Reader __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_extract_dynamic_client", 0);

  /* "capnp/lib/capnp.pyx":659
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_client(_DynamicCapabilityClient value):
 *     return C_DynamicValue.Reader(value.thisptr)             # <<<<<<<<<<<<<<
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_server(object value):
 */
  __pyx_r =  ::capnp::DynamicValue::Reader(__pyx_v_value->thisptr);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":658
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_client(_DynamicCapabilityClient value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 */

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

/* "capnp/lib/capnp.pyx":661
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_server(object value):             # <<<<<<<<<<<<<<
 *     cdef _InterfaceSchema schema = value.schema
 *     return helpers.new_server(schema.thisptr, <PyObject *>value)
 */

static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_server(PyObject *__pyx_v_value) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_schema = 0;
   ::capnp::DynamicValue::Reader __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_extract_dynamic_server", 0);

  /* "capnp/lib/capnp.pyx":662
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_server(object value):
 *     cdef _InterfaceSchema schema = value.schema             # <<<<<<<<<<<<<<
 *     return helpers.new_server(schema.thisptr, <PyObject *>value)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 662, __pyx_L1_error)
  __pyx_v_schema = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":663
 * cdef C_DynamicValue.Reader _extract_dynamic_server(object value):
 *     cdef _InterfaceSchema schema = value.schema
 *     return helpers.new_server(schema.thisptr, <PyObject *>value)             # <<<<<<<<<<<<<<
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_enum(_DynamicEnum value):
 */
  __pyx_r = new_server(__pyx_v_schema->thisptr, ((PyObject *)__pyx_v_value));
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":661
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_server(object value):             # <<<<<<<<<<<<<<
 *     cdef _InterfaceSchema schema = value.schema
 *     return helpers.new_server(schema.thisptr, <PyObject *>value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("capnp.lib.capnp._extract_dynamic_server", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_schema);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":665
 *     return helpers.new_server(schema.thisptr, <PyObject *>value)
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_enum(_DynamicEnum value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 */

static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_dynamic_enum(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_value) {
   ::capnp::DynamicValue::Reader __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_extract_dynamic_enum", 0);

  /* "capnp/lib/capnp.pyx":666
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_enum(_DynamicEnum value):
 *     return C_DynamicValue.Reader(value.thisptr)             # <<<<<<<<<<<<<<
 * 
 * cdef C_DynamicValue.Reader _extract_any_pointer(_DynamicObjectReader value):
 */
  __pyx_r =  ::capnp::DynamicValue::Reader(__pyx_v_value->thisptr);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":665
 *     return helpers.new_server(schema.thisptr, <PyObject *>value)
 * 
 * cdef C_DynamicValue.Reader _extract_dynamic_enum(_DynamicEnum value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 */

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

/* "capnp/lib/capnp.pyx":668
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 * cdef C_DynamicValue.Reader _extract_any_pointer(_DynamicObjectReader value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 */

static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_any_pointer(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_value) {
   ::capnp::DynamicValue::Reader __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_extract_any_pointer", 0);

  /* "capnp/lib/capnp.pyx":669
 * 
 * cdef C_DynamicValue.Reader _extract_any_pointer(_DynamicObjectReader value):
 *     return C_DynamicValue.Reader(value.thisptr)             # <<<<<<<<<<<<<<
 * 
 * cdef C_DynamicValue.Reader _extract_any_pointer_builder(_DynamicObjectBuilder value):
 */
  __pyx_r =  ::capnp::DynamicValue::Reader(__pyx_v_value->thisptr);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":668
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 * cdef C_DynamicValue.Reader _extract_any_pointer(_DynamicObjectReader value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 */

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

/* "capnp/lib/capnp.pyx":671
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 * cdef C_DynamicValue.Reader _extract_any_pointer_builder(_DynamicObjectBuilder value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr.asReader())
 * 
 */

static  ::capnp::DynamicValue::Reader __pyx_f_5capnp_3lib_5capnp__extract_any_pointer_builder(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_value) {
   ::capnp::DynamicValue::Reader __pyx_r;
  __Pyx_RefNannyDeclarations
   ::capnp::AnyPointer::Reader __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_extract_any_pointer_builder", 0);

  /* "capnp/lib/capnp.pyx":672
 * 
 * cdef C_DynamicValue.Reader _extract_any_pointer_builder(_DynamicObjectBuilder value):
 *     return C_DynamicValue.Reader(value.thisptr.asReader())             # <<<<<<<<<<<<<<
 * 
 * cdef _setBytes(_DynamicSetterClasses thisptr, field, value):
 */
  try {
    __pyx_t_1 = __pyx_v_value->thisptr->asReader();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 672, __pyx_L1_error)
  }
  __pyx_r =  ::capnp::DynamicValue::Reader(__pyx_t_1);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":671
 *     return C_DynamicValue.Reader(value.thisptr)
 * 
 * cdef C_DynamicValue.Reader _extract_any_pointer_builder(_DynamicObjectBuilder value):             # <<<<<<<<<<<<<<
 *     return C_DynamicValue.Reader(value.thisptr.asReader())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("capnp.lib.capnp._extract_any_pointer_builder", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":674
 *     return C_DynamicValue.Reader(value.thisptr.asReader())
 * 
 * cdef _setBytes(_DynamicSetterClasses thisptr, field, value):             # <<<<<<<<<<<<<<
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 */

static PyObject *__pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setBytes( ::capnp::DynamicList::Builder __pyx_v_thisptr, PyObject *__pyx_v_field, PyObject *__pyx_v_value) {
   ::kj::StringPtr __pyx_v_temp_string;
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_fuse_0_setBytes", 0);

  /* "capnp/lib/capnp.pyx":675
 * 
 * cdef _setBytes(_DynamicSetterClasses thisptr, field, value):
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.set(field, temp)
 */
  __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L1_error)
  __pyx_t_2 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 675, __pyx_L1_error)
  __pyx_v_temp_string =  ::kj::StringPtr(((char *)__pyx_t_1), __pyx_t_2);

  /* "capnp/lib/capnp.pyx":676
 * cdef _setBytes(_DynamicSetterClasses thisptr, field, value):
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)             # <<<<<<<<<<<<<<
 *     thisptr.set(field, temp)
 * 
 */
  __pyx_v_temp =  ::capnp::DynamicValue::Reader(__pyx_v_temp_string);

  /* "capnp/lib/capnp.pyx":677
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 * 
 * cdef _setBaseString(_DynamicSetterClasses thisptr, field, value):
 */
  __pyx_t_3 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error)
  try {
    __pyx_v_thisptr.set(__pyx_t_3, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 677, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":674
 *     return C_DynamicValue.Reader(value.thisptr.asReader())
 * 
 * cdef _setBytes(_DynamicSetterClasses thisptr, field, value):             # <<<<<<<<<<<<<<
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._setBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setBytes( ::capnp::DynamicStruct::Builder __pyx_v_thisptr, PyObject *__pyx_v_field, PyObject *__pyx_v_value) {
   ::kj::StringPtr __pyx_v_temp_string;
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_fuse_1_setBytes", 0);

  /* "capnp/lib/capnp.pyx":675
 * 
 * cdef _setBytes(_DynamicSetterClasses thisptr, field, value):
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.set(field, temp)
 */
  __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L1_error)
  __pyx_t_2 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 675, __pyx_L1_error)
  __pyx_v_temp_string =  ::kj::StringPtr(((char *)__pyx_t_1), __pyx_t_2);

  /* "capnp/lib/capnp.pyx":676
 * cdef _setBytes(_DynamicSetterClasses thisptr, field, value):
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)             # <<<<<<<<<<<<<<
 *     thisptr.set(field, temp)
 * 
 */
  __pyx_v_temp =  ::capnp::DynamicValue::Reader(__pyx_v_temp_string);

  /* "capnp/lib/capnp.pyx":677
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 * 
 * cdef _setBaseString(_DynamicSetterClasses thisptr, field, value):
 */
  __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error)
  try {
    __pyx_v_thisptr.set(__pyx_t_1, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 677, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":674
 *     return C_DynamicValue.Reader(value.thisptr.asReader())
 * 
 * cdef _setBytes(_DynamicSetterClasses thisptr, field, value):             # <<<<<<<<<<<<<<
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._setBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":679
 *     thisptr.set(field, temp)
 * 
 * cdef _setBaseString(_DynamicSetterClasses thisptr, field, value):             # <<<<<<<<<<<<<<
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 */

static PyObject *__pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setBaseString( ::capnp::DynamicList::Builder __pyx_v_thisptr, PyObject *__pyx_v_field, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_encoded_value = NULL;
   ::kj::StringPtr __pyx_v_temp_string;
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_fuse_0_setBaseString", 0);

  /* "capnp/lib/capnp.pyx":680
 * 
 * cdef _setBaseString(_DynamicSetterClasses thisptr, field, value):
 *     encoded_value = value.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_encoded_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":681
 * cdef _setBaseString(_DynamicSetterClasses thisptr, field, value):
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.set(field, temp)
 */
  __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_encoded_value); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 681, __pyx_L1_error)
  __pyx_t_5 = PyObject_Length(__pyx_v_encoded_value); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 681, __pyx_L1_error)
  __pyx_v_temp_string =  ::kj::StringPtr(((char *)__pyx_t_4), __pyx_t_5);

  /* "capnp/lib/capnp.pyx":682
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)             # <<<<<<<<<<<<<<
 *     thisptr.set(field, temp)
 * 
 */
  __pyx_v_temp =  ::capnp::DynamicValue::Reader(__pyx_v_temp_string);

  /* "capnp/lib/capnp.pyx":683
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 * 
 * cdef _setBytesField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):
 */
  __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L1_error)
  try {
    __pyx_v_thisptr.set(__pyx_t_6, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 683, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":679
 *     thisptr.set(field, temp)
 * 
 * cdef _setBaseString(_DynamicSetterClasses thisptr, field, value):             # <<<<<<<<<<<<<<
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._setBaseString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encoded_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setBaseString( ::capnp::DynamicStruct::Builder __pyx_v_thisptr, PyObject *__pyx_v_field, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_encoded_value = NULL;
   ::kj::StringPtr __pyx_v_temp_string;
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_fuse_1_setBaseString", 0);

  /* "capnp/lib/capnp.pyx":680
 * 
 * cdef _setBaseString(_DynamicSetterClasses thisptr, field, value):
 *     encoded_value = value.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_encoded_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":681
 * cdef _setBaseString(_DynamicSetterClasses thisptr, field, value):
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.set(field, temp)
 */
  __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_encoded_value); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 681, __pyx_L1_error)
  __pyx_t_5 = PyObject_Length(__pyx_v_encoded_value); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 681, __pyx_L1_error)
  __pyx_v_temp_string =  ::kj::StringPtr(((char *)__pyx_t_4), __pyx_t_5);

  /* "capnp/lib/capnp.pyx":682
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)             # <<<<<<<<<<<<<<
 *     thisptr.set(field, temp)
 * 
 */
  __pyx_v_temp =  ::capnp::DynamicValue::Reader(__pyx_v_temp_string);

  /* "capnp/lib/capnp.pyx":683
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 * 
 * cdef _setBytesField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):
 */
  __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L1_error)
  try {
    __pyx_v_thisptr.set(__pyx_t_4, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 683, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":679
 *     thisptr.set(field, temp)
 * 
 * cdef _setBaseString(_DynamicSetterClasses thisptr, field, value):             # <<<<<<<<<<<<<<
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._setBaseString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encoded_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":685
 *     thisptr.set(field, temp)
 * 
 * cdef _setBytesField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):             # <<<<<<<<<<<<<<
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp__setBytesField( ::capnp::DynamicStruct::Builder __pyx_v_thisptr, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, PyObject *__pyx_v_value) {
   ::kj::StringPtr __pyx_v_temp_string;
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setBytesField", 0);

  /* "capnp/lib/capnp.pyx":686
 * 
 * cdef _setBytesField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.setByField(field.thisptr, temp)
 */
  __pyx_t_1 = __Pyx_PyObject_AsWritableString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_t_2 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_v_temp_string =  ::kj::StringPtr(((char *)__pyx_t_1), __pyx_t_2);

  /* "capnp/lib/capnp.pyx":687
 * cdef _setBytesField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)             # <<<<<<<<<<<<<<
 *     thisptr.setByField(field.thisptr, temp)
 * 
 */
  __pyx_v_temp =  ::capnp::DynamicValue::Reader(__pyx_v_temp_string);

  /* "capnp/lib/capnp.pyx":688
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.setByField(field.thisptr, temp)             # <<<<<<<<<<<<<<
 * 
 * cdef _setBaseStringField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):
 */
  try {
    __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 688, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":685
 *     thisptr.set(field, temp)
 * 
 * cdef _setBytesField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):             # <<<<<<<<<<<<<<
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>value, len(value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._setBytesField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":690
 *     thisptr.setByField(field.thisptr, temp)
 * 
 * cdef _setBaseStringField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):             # <<<<<<<<<<<<<<
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp__setBaseStringField( ::capnp::DynamicStruct::Builder __pyx_v_thisptr, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_encoded_value = NULL;
   ::kj::StringPtr __pyx_v_temp_string;
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setBaseStringField", 0);

  /* "capnp/lib/capnp.pyx":691
 * 
 * cdef _setBaseStringField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):
 *     encoded_value = value.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_encoded_value = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":692
 * cdef _setBaseStringField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.setByField(field.thisptr, temp)
 */
  __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_v_encoded_value); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 692, __pyx_L1_error)
  __pyx_t_5 = PyObject_Length(__pyx_v_encoded_value); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 692, __pyx_L1_error)
  __pyx_v_temp_string =  ::kj::StringPtr(((char *)__pyx_t_4), __pyx_t_5);

  /* "capnp/lib/capnp.pyx":693
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)             # <<<<<<<<<<<<<<
 *     thisptr.setByField(field.thisptr, temp)
 * 
 */
  __pyx_v_temp =  ::capnp::DynamicValue::Reader(__pyx_v_temp_string);

  /* "capnp/lib/capnp.pyx":694
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_value))
 *     cdef C_DynamicValue.Reader temp = C_DynamicValue.Reader(temp_string)
 *     thisptr.setByField(field.thisptr, temp)             # <<<<<<<<<<<<<<
 * 
 * cdef _setDynamicField(_DynamicSetterClasses thisptr, field, value, parent):
 */
  try {
    __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 694, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":690
 *     thisptr.setByField(field.thisptr, temp)
 * 
 * cdef _setBaseStringField(DynamicStruct_Builder thisptr, _StructSchemaField field, value):             # <<<<<<<<<<<<<<
 *     encoded_value = value.encode('utf-8')
 *     cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>encoded_value, len(encoded_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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._setBaseStringField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_encoded_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":696
 *     thisptr.setByField(field.thisptr, temp)
 * 
 * cdef _setDynamicField(_DynamicSetterClasses thisptr, field, value, parent):             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)
 */

static PyObject *__pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setDynamicField( ::capnp::DynamicList::Builder __pyx_v_thisptr, PyObject *__pyx_v_field, PyObject *__pyx_v_value, PyObject *__pyx_v_parent) {
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyTypeObject *__pyx_v_value_type = NULL;
  PyObject *__pyx_v_builder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PY_LONG_LONG __pyx_t_5;
  unsigned PY_LONG_LONG __pyx_t_6;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_7;
  double __pyx_t_8;
  bool __pyx_t_9;
  Py_ssize_t __pyx_t_10;
   ::capnp::DynamicValue::Builder __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_fuse_0_setDynamicField", 0);

  /* "capnp/lib/capnp.pyx":698
 * cdef _setDynamicField(_DynamicSetterClasses thisptr, field, value, parent):
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)             # <<<<<<<<<<<<<<
 * 
 *     if value_type is int or value_type is long:
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
  __pyx_v_value_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value)));

  /* "capnp/lib/capnp.pyx":700
 *     value_type = type(value)
 * 
 *     if value_type is int or value_type is long:             # <<<<<<<<<<<<<<
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)
 */
  __pyx_t_2 = (__pyx_v_value_type == (&PyInt_Type));
  __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 = (__pyx_v_value_type == (&PyLong_Type));
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":701
 * 
 *     if value_type is int or value_type is long:
 *         if value < 0:             # <<<<<<<<<<<<<<
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "capnp/lib/capnp.pyx":702
 *     if value_type is int or value_type is long:
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)             # <<<<<<<<<<<<<<
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 */
      __pyx_t_5 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 702, __pyx_L1_error)
      __pyx_v_temp =  ::capnp::DynamicValue::Reader(((PY_LONG_LONG)__pyx_t_5));

      /* "capnp/lib/capnp.pyx":701
 * 
 *     if value_type is int or value_type is long:
 *         if value < 0:             # <<<<<<<<<<<<<<
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 */
      goto __pyx_L6;
    }

    /* "capnp/lib/capnp.pyx":704
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is float:
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L1_error)
      __pyx_v_temp =  ::capnp::DynamicValue::Reader(((unsigned PY_LONG_LONG)__pyx_t_6));
    }
    __pyx_L6:;

    /* "capnp/lib/capnp.pyx":705
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 705, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 705, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":700
 *     value_type = type(value)
 * 
 *     if value_type is int or value_type is long:             # <<<<<<<<<<<<<<
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":706
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.set(field, temp)
 *     elif value_type is float:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyFloat_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":707
 *         thisptr.set(field, temp)
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is bool:
 */
    __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
    __pyx_v_temp =  ::capnp::DynamicValue::Reader(((double)__pyx_t_8));

    /* "capnp/lib/capnp.pyx":708
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 708, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":706
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.set(field, temp)
 *     elif value_type is float:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":709
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bool:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 */
  __pyx_t_2 = (__pyx_v_value_type == ((PyTypeObject*)((PyObject*)&PyBool_Type)));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":710
 *         thisptr.set(field, temp)
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:
 */
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L1_error)
    __pyx_v_temp =  ::capnp::DynamicValue::Reader(((bool)__pyx_t_9));

    /* "capnp/lib/capnp.pyx":711
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 711, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 711, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":709
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bool:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":712
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:             # <<<<<<<<<<<<<<
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyBytes_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":713
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)             # <<<<<<<<<<<<<<
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)
 */
    __pyx_t_4 = __pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setBytes(__pyx_v_thisptr, __pyx_v_field, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":712
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:             # <<<<<<<<<<<<<<
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":714
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):             # <<<<<<<<<<<<<<
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:
 */
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_v_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":715
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)             # <<<<<<<<<<<<<<
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 */
    __pyx_t_4 = __pyx_fuse_0__pyx_f_5capnp_3lib_5capnp__setBaseString(__pyx_v_thisptr, __pyx_v_field, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":714
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):             # <<<<<<<<<<<<<<
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":716
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyList_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":717
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)             # <<<<<<<<<<<<<<
 *         _from_list(builder, value)
 *     elif value_type is tuple:
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 717, __pyx_L1_error)
    __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 717, __pyx_L1_error)
    try {
      __pyx_t_11 = __pyx_v_thisptr.init(__pyx_t_7, __pyx_t_10);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 717, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_11), __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_builder = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":718
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)             # <<<<<<<<<<<<<<
 *     elif value_type is tuple:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 */
    if (!(likely(((__pyx_v_builder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_builder, __pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder))))) __PYX_ERR(0, 718, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 718, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp__from_list(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_builder), ((PyObject*)__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":716
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":719
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 *     elif value_type is tuple:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)
 */
  __pyx_t_2 = (__pyx_v_value_type == (&PyTuple_Type));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":720
 *         _from_list(builder, value)
 *     elif value_type is tuple:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)             # <<<<<<<<<<<<<<
 *         _from_tuple(builder, value)
 *     elif value_type is dict:
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error)
    __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 720, __pyx_L1_error)
    try {
      __pyx_t_11 = __pyx_v_thisptr.init(__pyx_t_7, __pyx_t_10);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 720, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_11), __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_builder = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":721
 *     elif value_type is tuple:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)             # <<<<<<<<<<<<<<
 *     elif value_type is dict:
 *         if _DynamicSetterClasses is DynamicStruct_Builder:
 */
    if (!(likely(((__pyx_v_builder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_builder, __pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder))))) __PYX_ERR(0, 721, __pyx_L1_error)
    if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 721, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp__from_tuple(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_builder), ((PyObject*)__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":719
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 *     elif value_type is tuple:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":722
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)
 *     elif value_type is dict:             # <<<<<<<<<<<<<<
 *         if _DynamicSetterClasses is DynamicStruct_Builder:
 *             builder = to_python_builder(thisptr.get(field), parent)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyDict_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":727
 *             builder.from_dict(value)
 *         else:
 *             builder = to_python_builder(thisptr[field], parent)             # <<<<<<<<<<<<<<
 *             builder.from_dict(value)
 *     elif value is None:
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 727, __pyx_L1_error)
    try {
      __pyx_t_11 = __pyx_v_thisptr[__pyx_t_7];
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 727, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_11), __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_builder = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":728
 *         else:
 *             builder = to_python_builder(thisptr[field], parent)
 *             builder.from_dict(value)             # <<<<<<<<<<<<<<
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)
 */
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_builder, __pyx_n_s_from_dict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_value);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":722
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)
 *     elif value_type is dict:             # <<<<<<<<<<<<<<
 *         if _DynamicSetterClasses is DynamicStruct_Builder:
 *             builder = to_python_builder(thisptr.get(field), parent)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":729
 *             builder = to_python_builder(thisptr[field], parent)
 *             builder.from_dict(value)
 *     elif value is None:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 */
  __pyx_t_2 = (__pyx_v_value == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":730
 *             builder.from_dict(value)
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:
 */
    __pyx_v_temp =  ::capnp::DynamicValue::Reader( ::capnp::VOID);

    /* "capnp/lib/capnp.pyx":731
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 731, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":729
 *             builder = to_python_builder(thisptr[field], parent)
 *             builder.from_dict(value)
 *     elif value is None:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":732
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":733
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder))))) __PYX_ERR(0, 733, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_builder(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 733, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":732
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":734
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":735
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 735, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader))))) __PYX_ERR(0, 735, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_reader(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 735, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":734
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":736
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":737
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient))))) __PYX_ERR(0, 737, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_client(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 737, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":736
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":738
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer);
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer); 
  __pyx_t_1 = (__pyx_t_3 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":739
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 739, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_server(__pyx_v_value)));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 739, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":738
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":740
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":741
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 741, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum))))) __PYX_ERR(0, 741, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_enum(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 741, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":740
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":742
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":743
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicObjectBuilder:
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 743, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader))))) __PYX_ERR(0, 743, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_any_pointer(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 743, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":742
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":744
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":745
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 *         thisptr.set(field, _extract_any_pointer_builder(value))             # <<<<<<<<<<<<<<
 *     else:
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))
 */
    __pyx_t_7 = __Pyx_PyInt_As_unsigned_int(__pyx_v_field); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder))))) __PYX_ERR(0, 745, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_any_pointer_builder(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 745, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":744
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":747
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))             # <<<<<<<<<<<<<<
 * 
 * cdef _setDynamicFieldWithField(DynamicStruct_Builder thisptr, _StructSchemaField field, value, parent):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_KjException); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Tried_to_set_field_with_a_value, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_value); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = NULL;
    __pyx_t_18 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
        __pyx_t_18 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_field, __pyx_t_15, __pyx_t_16};
      __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_field, __pyx_t_15, __pyx_t_16};
      __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    {
      __pyx_t_19 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__pyx_t_17) {
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __pyx_t_17 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_18, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_18, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_18, __pyx_t_16);
      __pyx_t_15 = 0;
      __pyx_t_16 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    }
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 747, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":696
 *     thisptr.setByField(field.thisptr, temp)
 * 
 * cdef _setDynamicField(_DynamicSetterClasses thisptr, field, value, parent):             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)
 */

  /* 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_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("capnp.lib.capnp._setDynamicField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value_type);
  __Pyx_XDECREF(__pyx_v_builder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setDynamicField( ::capnp::DynamicStruct::Builder __pyx_v_thisptr, PyObject *__pyx_v_field, PyObject *__pyx_v_value, PyObject *__pyx_v_parent) {
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyTypeObject *__pyx_v_value_type = NULL;
  PyObject *__pyx_v_builder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PY_LONG_LONG __pyx_t_5;
  unsigned PY_LONG_LONG __pyx_t_6;
  char *__pyx_t_7;
  double __pyx_t_8;
  bool __pyx_t_9;
  Py_ssize_t __pyx_t_10;
   ::capnp::DynamicValue::Builder __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_fuse_1_setDynamicField", 0);

  /* "capnp/lib/capnp.pyx":698
 * cdef _setDynamicField(_DynamicSetterClasses thisptr, field, value, parent):
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)             # <<<<<<<<<<<<<<
 * 
 *     if value_type is int or value_type is long:
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
  __pyx_v_value_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value)));

  /* "capnp/lib/capnp.pyx":700
 *     value_type = type(value)
 * 
 *     if value_type is int or value_type is long:             # <<<<<<<<<<<<<<
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)
 */
  __pyx_t_2 = (__pyx_v_value_type == (&PyInt_Type));
  __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 = (__pyx_v_value_type == (&PyLong_Type));
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":701
 * 
 *     if value_type is int or value_type is long:
 *         if value < 0:             # <<<<<<<<<<<<<<
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "capnp/lib/capnp.pyx":702
 *     if value_type is int or value_type is long:
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)             # <<<<<<<<<<<<<<
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 */
      __pyx_t_5 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 702, __pyx_L1_error)
      __pyx_v_temp =  ::capnp::DynamicValue::Reader(((PY_LONG_LONG)__pyx_t_5));

      /* "capnp/lib/capnp.pyx":701
 * 
 *     if value_type is int or value_type is long:
 *         if value < 0:             # <<<<<<<<<<<<<<
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 */
      goto __pyx_L6;
    }

    /* "capnp/lib/capnp.pyx":704
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is float:
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L1_error)
      __pyx_v_temp =  ::capnp::DynamicValue::Reader(((unsigned PY_LONG_LONG)__pyx_t_6));
    }
    __pyx_L6:;

    /* "capnp/lib/capnp.pyx":705
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 705, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 705, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":700
 *     value_type = type(value)
 * 
 *     if value_type is int or value_type is long:             # <<<<<<<<<<<<<<
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":706
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.set(field, temp)
 *     elif value_type is float:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyFloat_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":707
 *         thisptr.set(field, temp)
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is bool:
 */
    __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
    __pyx_v_temp =  ::capnp::DynamicValue::Reader(((double)__pyx_t_8));

    /* "capnp/lib/capnp.pyx":708
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 708, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":706
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.set(field, temp)
 *     elif value_type is float:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":709
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bool:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 */
  __pyx_t_2 = (__pyx_v_value_type == ((PyTypeObject*)((PyObject*)&PyBool_Type)));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":710
 *         thisptr.set(field, temp)
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:
 */
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L1_error)
    __pyx_v_temp =  ::capnp::DynamicValue::Reader(((bool)__pyx_t_9));

    /* "capnp/lib/capnp.pyx":711
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 711, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 711, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":709
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bool:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":712
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:             # <<<<<<<<<<<<<<
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyBytes_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":713
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)             # <<<<<<<<<<<<<<
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)
 */
    __pyx_t_4 = __pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setBytes(__pyx_v_thisptr, __pyx_v_field, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":712
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:             # <<<<<<<<<<<<<<
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":714
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):             # <<<<<<<<<<<<<<
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:
 */
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_v_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":715
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)             # <<<<<<<<<<<<<<
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 */
    __pyx_t_4 = __pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setBaseString(__pyx_v_thisptr, __pyx_v_field, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":714
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):             # <<<<<<<<<<<<<<
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":716
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyList_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":717
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)             # <<<<<<<<<<<<<<
 *         _from_list(builder, value)
 *     elif value_type is tuple:
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 717, __pyx_L1_error)
    __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 717, __pyx_L1_error)
    try {
      __pyx_t_11 = __pyx_v_thisptr.init(__pyx_t_7, __pyx_t_10);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 717, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_11), __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_builder = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":718
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)             # <<<<<<<<<<<<<<
 *     elif value_type is tuple:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 */
    if (!(likely(((__pyx_v_builder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_builder, __pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder))))) __PYX_ERR(0, 718, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 718, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp__from_list(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_builder), ((PyObject*)__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":716
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":719
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 *     elif value_type is tuple:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)
 */
  __pyx_t_2 = (__pyx_v_value_type == (&PyTuple_Type));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":720
 *         _from_list(builder, value)
 *     elif value_type is tuple:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)             # <<<<<<<<<<<<<<
 *         _from_tuple(builder, value)
 *     elif value_type is dict:
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error)
    __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 720, __pyx_L1_error)
    try {
      __pyx_t_11 = __pyx_v_thisptr.init(__pyx_t_7, __pyx_t_10);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 720, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_11), __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_builder = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":721
 *     elif value_type is tuple:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)             # <<<<<<<<<<<<<<
 *     elif value_type is dict:
 *         if _DynamicSetterClasses is DynamicStruct_Builder:
 */
    if (!(likely(((__pyx_v_builder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_builder, __pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder))))) __PYX_ERR(0, 721, __pyx_L1_error)
    if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 721, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp__from_tuple(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_builder), ((PyObject*)__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":719
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 *     elif value_type is tuple:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":722
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)
 *     elif value_type is dict:             # <<<<<<<<<<<<<<
 *         if _DynamicSetterClasses is DynamicStruct_Builder:
 *             builder = to_python_builder(thisptr.get(field), parent)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyDict_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":724
 *     elif value_type is dict:
 *         if _DynamicSetterClasses is DynamicStruct_Builder:
 *             builder = to_python_builder(thisptr.get(field), parent)             # <<<<<<<<<<<<<<
 *             builder.from_dict(value)
 *         else:
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L1_error)
    try {
      __pyx_t_11 = __pyx_v_thisptr.get(__pyx_t_7);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 724, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_11), __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_builder = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":725
 *         if _DynamicSetterClasses is DynamicStruct_Builder:
 *             builder = to_python_builder(thisptr.get(field), parent)
 *             builder.from_dict(value)             # <<<<<<<<<<<<<<
 *         else:
 *             builder = to_python_builder(thisptr[field], parent)
 */
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_builder, __pyx_n_s_from_dict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_value);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":722
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_tuple(builder, value)
 *     elif value_type is dict:             # <<<<<<<<<<<<<<
 *         if _DynamicSetterClasses is DynamicStruct_Builder:
 *             builder = to_python_builder(thisptr.get(field), parent)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":729
 *             builder = to_python_builder(thisptr[field], parent)
 *             builder.from_dict(value)
 *     elif value is None:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 */
  __pyx_t_2 = (__pyx_v_value == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":730
 *             builder.from_dict(value)
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:
 */
    __pyx_v_temp =  ::capnp::DynamicValue::Reader( ::capnp::VOID);

    /* "capnp/lib/capnp.pyx":731
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 731, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":729
 *             builder = to_python_builder(thisptr[field], parent)
 *             builder.from_dict(value)
 *     elif value is None:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":732
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":733
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder))))) __PYX_ERR(0, 733, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_builder(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 733, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":732
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":734
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":735
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 735, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader))))) __PYX_ERR(0, 735, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_reader(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 735, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":734
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":736
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":737
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient))))) __PYX_ERR(0, 737, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_client(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 737, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":736
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":738
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer);
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer); 
  __pyx_t_1 = (__pyx_t_3 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":739
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 739, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_server(__pyx_v_value)));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 739, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":738
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":740
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":741
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 741, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum))))) __PYX_ERR(0, 741, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_enum(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 741, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":740
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":742
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":743
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicObjectBuilder:
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 743, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader))))) __PYX_ERR(0, 743, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_any_pointer(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 743, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":742
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":744
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":745
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 *         thisptr.set(field, _extract_any_pointer_builder(value))             # <<<<<<<<<<<<<<
 *     else:
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder))))) __PYX_ERR(0, 745, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_any_pointer_builder(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 745, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":744
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":747
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))             # <<<<<<<<<<<<<<
 * 
 * cdef _setDynamicFieldWithField(DynamicStruct_Builder thisptr, _StructSchemaField field, value, parent):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_KjException); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Tried_to_set_field_with_a_value, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_value); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = NULL;
    __pyx_t_18 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
        __pyx_t_18 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_field, __pyx_t_15, __pyx_t_16};
      __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_field, __pyx_t_15, __pyx_t_16};
      __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    {
      __pyx_t_19 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__pyx_t_17) {
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __pyx_t_17 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_18, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_18, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_18, __pyx_t_16);
      __pyx_t_15 = 0;
      __pyx_t_16 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    }
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 747, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":696
 *     thisptr.setByField(field.thisptr, temp)
 * 
 * cdef _setDynamicField(_DynamicSetterClasses thisptr, field, value, parent):             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)
 */

  /* 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_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("capnp.lib.capnp._setDynamicField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value_type);
  __Pyx_XDECREF(__pyx_v_builder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":749
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))
 * 
 * cdef _setDynamicFieldWithField(DynamicStruct_Builder thisptr, _StructSchemaField field, value, parent):             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp__setDynamicFieldWithField( ::capnp::DynamicStruct::Builder __pyx_v_thisptr, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, PyObject *__pyx_v_value, PyObject *__pyx_v_parent) {
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyTypeObject *__pyx_v_value_type = NULL;
  PyObject *__pyx_v_builder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PY_LONG_LONG __pyx_t_5;
  unsigned PY_LONG_LONG __pyx_t_6;
  double __pyx_t_7;
  bool __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  char *__pyx_t_10;
  Py_ssize_t __pyx_t_11;
   ::capnp::DynamicValue::Builder __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setDynamicFieldWithField", 0);

  /* "capnp/lib/capnp.pyx":751
 * cdef _setDynamicFieldWithField(DynamicStruct_Builder thisptr, _StructSchemaField field, value, parent):
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)             # <<<<<<<<<<<<<<
 * 
 *     if value_type is int or value_type is long:
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
  __pyx_v_value_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value)));

  /* "capnp/lib/capnp.pyx":753
 *     value_type = type(value)
 * 
 *     if value_type is int or value_type is long:             # <<<<<<<<<<<<<<
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)
 */
  __pyx_t_2 = (__pyx_v_value_type == (&PyInt_Type));
  __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 = (__pyx_v_value_type == (&PyLong_Type));
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":754
 * 
 *     if value_type is int or value_type is long:
 *         if value < 0:             # <<<<<<<<<<<<<<
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 754, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "capnp/lib/capnp.pyx":755
 *     if value_type is int or value_type is long:
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)             # <<<<<<<<<<<<<<
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 */
      __pyx_t_5 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 755, __pyx_L1_error)
      __pyx_v_temp =  ::capnp::DynamicValue::Reader(((PY_LONG_LONG)__pyx_t_5));

      /* "capnp/lib/capnp.pyx":754
 * 
 *     if value_type is int or value_type is long:
 *         if value < 0:             # <<<<<<<<<<<<<<
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 */
      goto __pyx_L6;
    }

    /* "capnp/lib/capnp.pyx":757
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is float:
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L1_error)
      __pyx_v_temp =  ::capnp::DynamicValue::Reader(((unsigned PY_LONG_LONG)__pyx_t_6));
    }
    __pyx_L6:;

    /* "capnp/lib/capnp.pyx":758
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.setByField(field.thisptr, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)
 */
    try {
      __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 758, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":753
 *     value_type = type(value)
 * 
 *     if value_type is int or value_type is long:             # <<<<<<<<<<<<<<
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":759
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is float:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.setByField(field.thisptr, temp)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyFloat_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":760
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is bool:
 */
    __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 760, __pyx_L1_error)
    __pyx_v_temp =  ::capnp::DynamicValue::Reader(((double)__pyx_t_7));

    /* "capnp/lib/capnp.pyx":761
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.setByField(field.thisptr, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)
 */
    try {
      __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 761, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":759
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is float:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.setByField(field.thisptr, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":762
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is bool:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.setByField(field.thisptr, temp)
 */
  __pyx_t_2 = (__pyx_v_value_type == ((PyTypeObject*)((PyObject*)&PyBool_Type)));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":763
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is bytes:
 */
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 763, __pyx_L1_error)
    __pyx_v_temp =  ::capnp::DynamicValue::Reader(((bool)__pyx_t_8));

    /* "capnp/lib/capnp.pyx":764
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.setByField(field.thisptr, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is bytes:
 *         _setBytesField(thisptr, field, value)
 */
    try {
      __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 764, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":762
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is bool:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.setByField(field.thisptr, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":765
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is bytes:             # <<<<<<<<<<<<<<
 *         _setBytesField(thisptr, field, value)
 *     elif isinstance(value, basestring):
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyBytes_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":766
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is bytes:
 *         _setBytesField(thisptr, field, value)             # <<<<<<<<<<<<<<
 *     elif isinstance(value, basestring):
 *         _setBaseStringField(thisptr, field, value)
 */
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp__setBytesField(__pyx_v_thisptr, __pyx_v_field, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":765
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is bytes:             # <<<<<<<<<<<<<<
 *         _setBytesField(thisptr, field, value)
 *     elif isinstance(value, basestring):
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":767
 *     elif value_type is bytes:
 *         _setBytesField(thisptr, field, value)
 *     elif isinstance(value, basestring):             # <<<<<<<<<<<<<<
 *         _setBaseStringField(thisptr, field, value)
 *     elif value_type is list:
 */
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_v_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":768
 *         _setBytesField(thisptr, field, value)
 *     elif isinstance(value, basestring):
 *         _setBaseStringField(thisptr, field, value)             # <<<<<<<<<<<<<<
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field.proto.name, len(value)), parent)
 */
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp__setBaseStringField(__pyx_v_thisptr, __pyx_v_field, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":767
 *     elif value_type is bytes:
 *         _setBytesField(thisptr, field, value)
 *     elif isinstance(value, basestring):             # <<<<<<<<<<<<<<
 *         _setBaseStringField(thisptr, field, value)
 *     elif value_type is list:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":769
 *     elif isinstance(value, basestring):
 *         _setBaseStringField(thisptr, field, value)
 *     elif value_type is list:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field.proto.name, len(value)), parent)
 *         _from_list(builder, value)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyList_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":770
 *         _setBaseStringField(thisptr, field, value)
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field.proto.name, len(value)), parent)             # <<<<<<<<<<<<<<
 *         _from_list(builder, value)
 *     elif value_type is dict:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_field), __pyx_n_s_proto); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_t_9); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 770, __pyx_L1_error)
    __pyx_t_11 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 770, __pyx_L1_error)
    try {
      __pyx_t_12 = __pyx_v_thisptr.init(__pyx_t_10, __pyx_t_11);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 770, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_12), __pyx_v_parent); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_v_builder = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":771
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field.proto.name, len(value)), parent)
 *         _from_list(builder, value)             # <<<<<<<<<<<<<<
 *     elif value_type is dict:
 *         builder = to_python_builder(thisptr.getByField(field.thisptr), parent)
 */
    if (!(likely(((__pyx_v_builder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_builder, __pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder))))) __PYX_ERR(0, 771, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 771, __pyx_L1_error)
    __pyx_t_9 = __pyx_f_5capnp_3lib_5capnp__from_list(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_builder), ((PyObject*)__pyx_v_value)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":769
 *     elif isinstance(value, basestring):
 *         _setBaseStringField(thisptr, field, value)
 *     elif value_type is list:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field.proto.name, len(value)), parent)
 *         _from_list(builder, value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":772
 *         builder = to_python_builder(thisptr.init(field.proto.name, len(value)), parent)
 *         _from_list(builder, value)
 *     elif value_type is dict:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.getByField(field.thisptr), parent)
 *         builder.from_dict(value)
 */
  __pyx_t_2 = (__pyx_v_value_type == (&PyDict_Type));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":773
 *         _from_list(builder, value)
 *     elif value_type is dict:
 *         builder = to_python_builder(thisptr.getByField(field.thisptr), parent)             # <<<<<<<<<<<<<<
 *         builder.from_dict(value)
 *     elif value is None:
 */
    try {
      __pyx_t_12 = __pyx_v_thisptr.get(__pyx_v_field->thisptr);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 773, __pyx_L1_error)
    }
    __pyx_t_9 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_12), __pyx_v_parent); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_v_builder = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":774
 *     elif value_type is dict:
 *         builder = to_python_builder(thisptr.getByField(field.thisptr), parent)
 *         builder.from_dict(value)             # <<<<<<<<<<<<<<
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_builder, __pyx_n_s_from_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_9 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_13, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":772
 *         builder = to_python_builder(thisptr.init(field.proto.name, len(value)), parent)
 *         _from_list(builder, value)
 *     elif value_type is dict:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.getByField(field.thisptr), parent)
 *         builder.from_dict(value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":775
 *         builder = to_python_builder(thisptr.getByField(field.thisptr), parent)
 *         builder.from_dict(value)
 *     elif value is None:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.setByField(field.thisptr, temp)
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":776
 *         builder.from_dict(value)
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is _DynamicStructBuilder:
 */
    __pyx_v_temp =  ::capnp::DynamicValue::Reader( ::capnp::VOID);

    /* "capnp/lib/capnp.pyx":777
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.setByField(field.thisptr, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_builder(value))
 */
    try {
      __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 777, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":775
 *         builder = to_python_builder(thisptr.getByField(field.thisptr), parent)
 *         builder.from_dict(value)
 *     elif value is None:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.setByField(field.thisptr, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":778
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":779
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_builder(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicStructReader:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_reader(value))
 */
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder))))) __PYX_ERR(0, 779, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_builder(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 779, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":778
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.setByField(field.thisptr, temp)
 *     elif value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":780
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":781
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_reader(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_client(value))
 */
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader))))) __PYX_ERR(0, 781, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_reader(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 781, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":780
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":782
 *     elif value_type is _DynamicStructReader:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":783
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_client(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.setByField(field.thisptr, _extract_dynamic_server(value))
 */
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient))))) __PYX_ERR(0, 783, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_client(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 783, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":782
 *     elif value_type is _DynamicStructReader:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":784
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer); 
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":785
 *         thisptr.setByField(field.thisptr, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.setByField(field.thisptr, _extract_dynamic_server(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicEnum:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_enum(value))
 */
    try {
      __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_server(__pyx_v_value)));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 785, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":784
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":786
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.setByField(field.thisptr, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":787
 *         thisptr.setByField(field.thisptr, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_enum(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 */
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum))))) __PYX_ERR(0, 787, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_v_field->thisptr, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_enum(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 787, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":786
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.setByField(field.thisptr, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         thisptr.setByField(field.thisptr, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":788
 *     elif value_type is _DynamicEnum:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":789
 *         thisptr.setByField(field.thisptr, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicObjectBuilder:
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 */
    __pyx_t_10 = __Pyx_PyObject_AsWritableString(((PyObject *)__pyx_v_field)); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 789, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader))))) __PYX_ERR(0, 789, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_10, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_any_pointer(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 789, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":788
 *     elif value_type is _DynamicEnum:
 *         thisptr.setByField(field.thisptr, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":790
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "capnp/lib/capnp.pyx":791
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 *         thisptr.set(field, _extract_any_pointer_builder(value))             # <<<<<<<<<<<<<<
 *     else:
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))
 */
    __pyx_t_10 = __Pyx_PyObject_AsWritableString(((PyObject *)__pyx_v_field)); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder))))) __PYX_ERR(0, 791, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_10, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_any_pointer_builder(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 791, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":790
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":793
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))             # <<<<<<<<<<<<<<
 * 
 * cdef _setDynamicFieldStatic(DynamicStruct_Builder thisptr, field, value, parent):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_KjException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Tried_to_set_field_with_a_value, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_value); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = NULL;
    __pyx_t_18 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
        __pyx_t_18 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, ((PyObject *)__pyx_v_field), __pyx_t_15, __pyx_t_16};
      __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, ((PyObject *)__pyx_v_field), __pyx_t_15, __pyx_t_16};
      __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    {
      __pyx_t_19 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__pyx_t_17) {
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __pyx_t_17 = NULL;
      }
      __Pyx_INCREF(((PyObject *)__pyx_v_field));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_field));
      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_18, ((PyObject *)__pyx_v_field));
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_18, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_18, __pyx_t_16);
      __pyx_t_15 = 0;
      __pyx_t_16 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    }
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_9 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_13);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_9, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __PYX_ERR(0, 793, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":749
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))
 * 
 * cdef _setDynamicFieldWithField(DynamicStruct_Builder thisptr, _StructSchemaField field, value, parent):             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("capnp.lib.capnp._setDynamicFieldWithField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value_type);
  __Pyx_XDECREF(__pyx_v_builder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":795
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))
 * 
 * cdef _setDynamicFieldStatic(DynamicStruct_Builder thisptr, field, value, parent):             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp__setDynamicFieldStatic( ::capnp::DynamicStruct::Builder __pyx_v_thisptr, PyObject *__pyx_v_field, PyObject *__pyx_v_value, PyObject *__pyx_v_parent) {
   ::capnp::DynamicValue::Reader __pyx_v_temp;
  PyTypeObject *__pyx_v_value_type = NULL;
  PyObject *__pyx_v_builder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PY_LONG_LONG __pyx_t_5;
  unsigned PY_LONG_LONG __pyx_t_6;
  char *__pyx_t_7;
  double __pyx_t_8;
  bool __pyx_t_9;
  Py_ssize_t __pyx_t_10;
   ::capnp::DynamicValue::Builder __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_setDynamicFieldStatic", 0);

  /* "capnp/lib/capnp.pyx":797
 * cdef _setDynamicFieldStatic(DynamicStruct_Builder thisptr, field, value, parent):
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)             # <<<<<<<<<<<<<<
 * 
 *     if value_type is int or value_type is long:
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
  __pyx_v_value_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value)));

  /* "capnp/lib/capnp.pyx":799
 *     value_type = type(value)
 * 
 *     if value_type is int or value_type is long:             # <<<<<<<<<<<<<<
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)
 */
  __pyx_t_2 = (__pyx_v_value_type == (&PyInt_Type));
  __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 = (__pyx_v_value_type == (&PyLong_Type));
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":800
 * 
 *     if value_type is int or value_type is long:
 *         if value < 0:             # <<<<<<<<<<<<<<
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 800, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 800, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "capnp/lib/capnp.pyx":801
 *     if value_type is int or value_type is long:
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)             # <<<<<<<<<<<<<<
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 */
      __pyx_t_5 = __Pyx_PyInt_As_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_5 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 801, __pyx_L1_error)
      __pyx_v_temp =  ::capnp::DynamicValue::Reader(((PY_LONG_LONG)__pyx_t_5));

      /* "capnp/lib/capnp.pyx":800
 * 
 *     if value_type is int or value_type is long:
 *         if value < 0:             # <<<<<<<<<<<<<<
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 */
      goto __pyx_L6;
    }

    /* "capnp/lib/capnp.pyx":803
 *            temp = C_DynamicValue.Reader(<long long>value)
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is float:
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 803, __pyx_L1_error)
      __pyx_v_temp =  ::capnp::DynamicValue::Reader(((unsigned PY_LONG_LONG)__pyx_t_6));
    }
    __pyx_L6:;

    /* "capnp/lib/capnp.pyx":804
 *         else:
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 804, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 804, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":799
 *     value_type = type(value)
 * 
 *     if value_type is int or value_type is long:             # <<<<<<<<<<<<<<
 *         if value < 0:
 *            temp = C_DynamicValue.Reader(<long long>value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":805
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.set(field, temp)
 *     elif value_type is float:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyFloat_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":806
 *         thisptr.set(field, temp)
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is bool:
 */
    __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 806, __pyx_L1_error)
    __pyx_v_temp =  ::capnp::DynamicValue::Reader(((double)__pyx_t_8));

    /* "capnp/lib/capnp.pyx":807
 *     elif value_type is float:
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 807, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 807, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":805
 *            temp = C_DynamicValue.Reader(<unsigned long long>value)
 *         thisptr.set(field, temp)
 *     elif value_type is float:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":808
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bool:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 */
  __pyx_t_2 = (__pyx_v_value_type == ((PyTypeObject*)((PyObject*)&PyBool_Type)));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":809
 *         thisptr.set(field, temp)
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:
 */
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
    __pyx_v_temp =  ::capnp::DynamicValue::Reader(((bool)__pyx_t_9));

    /* "capnp/lib/capnp.pyx":810
 *     elif value_type is bool:
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 810, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":808
 *         temp = C_DynamicValue.Reader(<double>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bool:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":811
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:             # <<<<<<<<<<<<<<
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyBytes_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":812
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)             # <<<<<<<<<<<<<<
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)
 */
    __pyx_t_4 = __pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setBytes(__pyx_v_thisptr, __pyx_v_field, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":811
 *         temp = C_DynamicValue.Reader(<cbool>value)
 *         thisptr.set(field, temp)
 *     elif value_type is bytes:             # <<<<<<<<<<<<<<
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":813
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):             # <<<<<<<<<<<<<<
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:
 */
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_v_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":814
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)             # <<<<<<<<<<<<<<
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 */
    __pyx_t_4 = __pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setBaseString(__pyx_v_thisptr, __pyx_v_field, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":813
 *     elif value_type is bytes:
 *         _setBytes(thisptr, field, value)
 *     elif isinstance(value, basestring):             # <<<<<<<<<<<<<<
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":815
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 */
  __pyx_t_1 = (__pyx_v_value_type == (&PyList_Type));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":816
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)             # <<<<<<<<<<<<<<
 *         _from_list(builder, value)
 *     elif value_type is dict:
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 816, __pyx_L1_error)
    __pyx_t_10 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 816, __pyx_L1_error)
    try {
      __pyx_t_11 = __pyx_v_thisptr.init(__pyx_t_7, __pyx_t_10);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 816, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_11), __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_builder = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":817
 *     elif value_type is list:
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)             # <<<<<<<<<<<<<<
 *     elif value_type is dict:
 *         builder = to_python_builder(thisptr.get(field), parent)
 */
    if (!(likely(((__pyx_v_builder) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_builder, __pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder))))) __PYX_ERR(0, 817, __pyx_L1_error)
    if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 817, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp__from_list(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_builder), ((PyObject*)__pyx_v_value)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":815
 *     elif isinstance(value, basestring):
 *         _setBaseString(thisptr, field, value)
 *     elif value_type is list:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":818
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 *     elif value_type is dict:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.get(field), parent)
 *         builder.from_dict(value)
 */
  __pyx_t_2 = (__pyx_v_value_type == (&PyDict_Type));
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":819
 *         _from_list(builder, value)
 *     elif value_type is dict:
 *         builder = to_python_builder(thisptr.get(field), parent)             # <<<<<<<<<<<<<<
 *         builder.from_dict(value)
 *     elif value is None:
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 819, __pyx_L1_error)
    try {
      __pyx_t_11 = __pyx_v_thisptr.get(__pyx_t_7);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 819, __pyx_L1_error)
    }
    __pyx_t_4 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_11), __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_builder = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":820
 *     elif value_type is dict:
 *         builder = to_python_builder(thisptr.get(field), parent)
 *         builder.from_dict(value)             # <<<<<<<<<<<<<<
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)
 */
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_builder, __pyx_n_s_from_dict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_value);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":818
 *         builder = to_python_builder(thisptr.init(field, len(value)), parent)
 *         _from_list(builder, value)
 *     elif value_type is dict:             # <<<<<<<<<<<<<<
 *         builder = to_python_builder(thisptr.get(field), parent)
 *         builder.from_dict(value)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":821
 *         builder = to_python_builder(thisptr.get(field), parent)
 *         builder.from_dict(value)
 *     elif value is None:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":822
 *         builder.from_dict(value)
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)             # <<<<<<<<<<<<<<
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:
 */
    __pyx_v_temp =  ::capnp::DynamicValue::Reader( ::capnp::VOID);

    /* "capnp/lib/capnp.pyx":823
 *     elif value is None:
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 823, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_v_temp));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 823, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":821
 *         builder = to_python_builder(thisptr.get(field), parent)
 *         builder.from_dict(value)
 *     elif value is None:             # <<<<<<<<<<<<<<
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":824
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":825
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 825, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder))))) __PYX_ERR(0, 825, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_builder(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 825, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":824
 *         temp = C_DynamicValue.Reader(VOID)
 *         thisptr.set(field, temp)
 *     elif value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":826
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":827
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 827, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader))))) __PYX_ERR(0, 827, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_struct_reader(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 827, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":826
 *     elif value_type is _DynamicStructBuilder:
 *         thisptr.set(field, _extract_dynamic_struct_builder(value))
 *     elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":828
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":829
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 829, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient))))) __PYX_ERR(0, 829, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_client(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 829, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":828
 *     elif value_type is _DynamicStructReader:
 *         thisptr.set(field, _extract_dynamic_struct_reader(value))
 *     elif value_type is _DynamicCapabilityClient:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":830
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer); 
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":831
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 831, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_server(__pyx_v_value)));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 831, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":830
 *     elif value_type is _DynamicCapabilityClient:
 *         thisptr.set(field, _extract_dynamic_client(value))
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":832
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":833
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 833, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum))))) __PYX_ERR(0, 833, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_dynamic_enum(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 833, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":832
 *     elif value_type is _DynamicCapabilityServer or isinstance(value, _DynamicCapabilityServer):
 *         thisptr.set(field, _extract_dynamic_server(value))
 *     elif value_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":834
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 */
  __pyx_t_2 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":835
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))             # <<<<<<<<<<<<<<
 *     elif value_type is _DynamicObjectBuilder:
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 835, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader))))) __PYX_ERR(0, 835, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_any_pointer(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 835, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":834
 *     elif value_type is _DynamicEnum:
 *         thisptr.set(field, _extract_dynamic_enum(value))
 *     elif value_type is _DynamicObjectReader:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":836
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 */
  __pyx_t_1 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "capnp/lib/capnp.pyx":837
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:
 *         thisptr.set(field, _extract_any_pointer_builder(value))             # <<<<<<<<<<<<<<
 *     else:
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))
 */
    __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 837, __pyx_L1_error)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder))))) __PYX_ERR(0, 837, __pyx_L1_error)
    try {
      __pyx_v_thisptr.set(__pyx_t_7, (( ::capnp::DynamicValue::Reader)__pyx_f_5capnp_3lib_5capnp__extract_any_pointer_builder(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_value))));
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 837, __pyx_L1_error)
    }

    /* "capnp/lib/capnp.pyx":836
 *     elif value_type is _DynamicObjectReader:
 *         thisptr.set(field, _extract_any_pointer(value))
 *     elif value_type is _DynamicObjectBuilder:             # <<<<<<<<<<<<<<
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":839
 *         thisptr.set(field, _extract_any_pointer_builder(value))
 *     else:
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))             # <<<<<<<<<<<<<<
 * 
 * cdef _DynamicListBuilder temp_list_b
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_KjException); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Tried_to_set_field_with_a_value, __pyx_n_s_format); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_value); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_17 = NULL;
    __pyx_t_18 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_17)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_17);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
        __pyx_t_18 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_field, __pyx_t_15, __pyx_t_16};
      __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 839, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
      PyObject *__pyx_temp[4] = {__pyx_t_17, __pyx_v_field, __pyx_t_15, __pyx_t_16};
      __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_18, 3+__pyx_t_18); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 839, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    } else
    #endif
    {
      __pyx_t_19 = PyTuple_New(3+__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      if (__pyx_t_17) {
        __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __pyx_t_17 = NULL;
      }
      __Pyx_INCREF(__pyx_v_field);
      __Pyx_GIVEREF(__pyx_v_field);
      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_18, __pyx_v_field);
      __Pyx_GIVEREF(__pyx_t_15);
      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_18, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_16);
      PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_18, __pyx_t_16);
      __pyx_t_15 = 0;
      __pyx_t_16 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_19, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    }
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_12);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_12, function);
      }
    }
    __pyx_t_4 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 839, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":795
 *         raise KjException("Tried to set field: '{}' with a value of: '{}' which is an unsupported type: '{}'".format(field, str(value), str(type(value))))
 * 
 * cdef _setDynamicFieldStatic(DynamicStruct_Builder thisptr, field, value, parent):             # <<<<<<<<<<<<<<
 *     cdef C_DynamicValue.Reader temp
 *     value_type = type(value)
 */

  /* 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_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("capnp.lib.capnp._setDynamicFieldStatic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value_type);
  __Pyx_XDECREF(__pyx_v_builder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":846
 * cdef _DynamicStructBuilder temp_msg_b
 * cdef _DynamicStructReader temp_msg_r
 * cdef _to_dict(msg, bint verbose, bint ordered):             # <<<<<<<<<<<<<<
 *     msg_type = type(msg)
 *     if msg_type is _DynamicListBuilder:
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp__to_dict(PyObject *__pyx_v_msg, int __pyx_v_verbose, int __pyx_v_ordered) {
  PyTypeObject *__pyx_v_msg_type = NULL;
  PyObject *__pyx_v_temp_list_b = NULL;
  PyObject *__pyx_v_temp_list_r = NULL;
  PyObject *__pyx_v_temp_list_rb = NULL;
  PyObject *__pyx_v_temp_msg_b = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_which = NULL;
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_v_temp_msg_r = NULL;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *(*__pyx_t_16)(PyObject *);
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_dict", 0);

  /* "capnp/lib/capnp.pyx":847
 * cdef _DynamicStructReader temp_msg_r
 * cdef _to_dict(msg, bint verbose, bint ordered):
 *     msg_type = type(msg)             # <<<<<<<<<<<<<<
 *     if msg_type is _DynamicListBuilder:
 *         temp_list_b = msg
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_msg)));
  __pyx_v_msg_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_msg)));

  /* "capnp/lib/capnp.pyx":848
 * cdef _to_dict(msg, bint verbose, bint ordered):
 *     msg_type = type(msg)
 *     if msg_type is _DynamicListBuilder:             # <<<<<<<<<<<<<<
 *         temp_list_b = msg
 *         return [_to_dict(temp_list_b._get(i), verbose, ordered) for i in range(len(msg))]
 */
  __pyx_t_1 = (__pyx_v_msg_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":849
 *     msg_type = type(msg)
 *     if msg_type is _DynamicListBuilder:
 *         temp_list_b = msg             # <<<<<<<<<<<<<<
 *         return [_to_dict(temp_list_b._get(i), verbose, ordered) for i in range(len(msg))]
 *     elif msg_type is _DynamicListReader:
 */
    __Pyx_INCREF(__pyx_v_msg);
    __pyx_v_temp_list_b = __pyx_v_msg;

    /* "capnp/lib/capnp.pyx":850
 *     if msg_type is _DynamicListBuilder:
 *         temp_list_b = msg
 *         return [_to_dict(temp_list_b._get(i), verbose, ordered) for i in range(len(msg))]             # <<<<<<<<<<<<<<
 *     elif msg_type is _DynamicListReader:
 *         temp_list_r = msg
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_Length(__pyx_v_msg); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 850, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_list_b, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __pyx_f_5capnp_3lib_5capnp__to_dict(__pyx_t_7, __pyx_v_verbose, __pyx_v_ordered); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 850, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":848
 * cdef _to_dict(msg, bint verbose, bint ordered):
 *     msg_type = type(msg)
 *     if msg_type is _DynamicListBuilder:             # <<<<<<<<<<<<<<
 *         temp_list_b = msg
 *         return [_to_dict(temp_list_b._get(i), verbose, ordered) for i in range(len(msg))]
 */
  }

  /* "capnp/lib/capnp.pyx":851
 *         temp_list_b = msg
 *         return [_to_dict(temp_list_b._get(i), verbose, ordered) for i in range(len(msg))]
 *     elif msg_type is _DynamicListReader:             # <<<<<<<<<<<<<<
 *         temp_list_r = msg
 *         return [_to_dict(temp_list_r._get(i), verbose, ordered) for i in range(len(msg))]
 */
  __pyx_t_2 = (__pyx_v_msg_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicListReader);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":852
 *         return [_to_dict(temp_list_b._get(i), verbose, ordered) for i in range(len(msg))]
 *     elif msg_type is _DynamicListReader:
 *         temp_list_r = msg             # <<<<<<<<<<<<<<
 *         return [_to_dict(temp_list_r._get(i), verbose, ordered) for i in range(len(msg))]
 *     elif msg_type is _DynamicResizableListBuilder:
 */
    __Pyx_INCREF(__pyx_v_msg);
    __pyx_v_temp_list_r = __pyx_v_msg;

    /* "capnp/lib/capnp.pyx":853
 *     elif msg_type is _DynamicListReader:
 *         temp_list_r = msg
 *         return [_to_dict(temp_list_r._get(i), verbose, ordered) for i in range(len(msg))]             # <<<<<<<<<<<<<<
 *     elif msg_type is _DynamicResizableListBuilder:
 *         temp_list_rb = msg
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_Length(__pyx_v_msg); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 853, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_list_r, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __pyx_f_5capnp_3lib_5capnp__to_dict(__pyx_t_8, __pyx_v_verbose, __pyx_v_ordered); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":851
 *         temp_list_b = msg
 *         return [_to_dict(temp_list_b._get(i), verbose, ordered) for i in range(len(msg))]
 *     elif msg_type is _DynamicListReader:             # <<<<<<<<<<<<<<
 *         temp_list_r = msg
 *         return [_to_dict(temp_list_r._get(i), verbose, ordered) for i in range(len(msg))]
 */
  }

  /* "capnp/lib/capnp.pyx":854
 *         temp_list_r = msg
 *         return [_to_dict(temp_list_r._get(i), verbose, ordered) for i in range(len(msg))]
 *     elif msg_type is _DynamicResizableListBuilder:             # <<<<<<<<<<<<<<
 *         temp_list_rb = msg
 *         return [_to_dict(temp_list_rb._get(i), verbose, ordered) for i in range(len(msg))]
 */
  __pyx_t_1 = (__pyx_v_msg_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicResizableListBuilder);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":855
 *         return [_to_dict(temp_list_r._get(i), verbose, ordered) for i in range(len(msg))]
 *     elif msg_type is _DynamicResizableListBuilder:
 *         temp_list_rb = msg             # <<<<<<<<<<<<<<
 *         return [_to_dict(temp_list_rb._get(i), verbose, ordered) for i in range(len(msg))]
 * 
 */
    __Pyx_INCREF(__pyx_v_msg);
    __pyx_v_temp_list_rb = __pyx_v_msg;

    /* "capnp/lib/capnp.pyx":856
 *     elif msg_type is _DynamicResizableListBuilder:
 *         temp_list_rb = msg
 *         return [_to_dict(temp_list_rb._get(i), verbose, ordered) for i in range(len(msg))]             # <<<<<<<<<<<<<<
 * 
 *     if msg_type is _DynamicStructBuilder or isinstance(msg, _Request):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_Length(__pyx_v_msg); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 856, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_list_rb, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __pyx_f_5capnp_3lib_5capnp__to_dict(__pyx_t_7, __pyx_v_verbose, __pyx_v_ordered); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":854
 *         temp_list_r = msg
 *         return [_to_dict(temp_list_r._get(i), verbose, ordered) for i in range(len(msg))]
 *     elif msg_type is _DynamicResizableListBuilder:             # <<<<<<<<<<<<<<
 *         temp_list_rb = msg
 *         return [_to_dict(temp_list_rb._get(i), verbose, ordered) for i in range(len(msg))]
 */
  }

  /* "capnp/lib/capnp.pyx":858
 *         return [_to_dict(temp_list_rb._get(i), verbose, ordered) for i in range(len(msg))]
 * 
 *     if msg_type is _DynamicStructBuilder or isinstance(msg, _Request):             # <<<<<<<<<<<<<<
 *         temp_msg_b = msg
 *         if ordered:
 */
  __pyx_t_1 = (__pyx_v_msg_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder);
  __pyx_t_11 = (__pyx_t_1 != 0);
  if (!__pyx_t_11) {
  } else {
    __pyx_t_2 = __pyx_t_11;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_11 = __Pyx_TypeCheck(__pyx_v_msg, __pyx_ptype_5capnp_3lib_5capnp__Request); 
  __pyx_t_1 = (__pyx_t_11 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L11_bool_binop_done:;
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":859
 * 
 *     if msg_type is _DynamicStructBuilder or isinstance(msg, _Request):
 *         temp_msg_b = msg             # <<<<<<<<<<<<<<
 *         if ordered:
 *             ret = _collections.OrderedDict()
 */
    __Pyx_INCREF(__pyx_v_msg);
    __pyx_v_temp_msg_b = __pyx_v_msg;

    /* "capnp/lib/capnp.pyx":860
 *     if msg_type is _DynamicStructBuilder or isinstance(msg, _Request):
 *         temp_msg_b = msg
 *         if ordered:             # <<<<<<<<<<<<<<
 *             ret = _collections.OrderedDict()
 *         else:
 */
    __pyx_t_2 = (__pyx_v_ordered != 0);
    if (__pyx_t_2) {

      /* "capnp/lib/capnp.pyx":861
 *         temp_msg_b = msg
 *         if ordered:
 *             ret = _collections.OrderedDict()             # <<<<<<<<<<<<<<
 *         else:
 *             ret = {}
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_collections); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 861, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 861, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 861, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_ret = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":860
 *     if msg_type is _DynamicStructBuilder or isinstance(msg, _Request):
 *         temp_msg_b = msg
 *         if ordered:             # <<<<<<<<<<<<<<
 *             ret = _collections.OrderedDict()
 *         else:
 */
      goto __pyx_L13;
    }

    /* "capnp/lib/capnp.pyx":863
 *             ret = _collections.OrderedDict()
 *         else:
 *             ret = {}             # <<<<<<<<<<<<<<
 *         try:
 *             which = temp_msg_b.which()
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_ret = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_L13:;

    /* "capnp/lib/capnp.pyx":864
 *         else:
 *             ret = {}
 *         try:             # <<<<<<<<<<<<<<
 *             which = temp_msg_b.which()
 *             ret[which] = _to_dict(temp_msg_b._get(which), verbose, ordered)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      /*try:*/ {

        /* "capnp/lib/capnp.pyx":865
 *             ret = {}
 *         try:
 *             which = temp_msg_b.which()             # <<<<<<<<<<<<<<
 *             ret[which] = _to_dict(temp_msg_b._get(which), verbose, ordered)
 *         except KjException:
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_b, __pyx_n_s_which); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 865, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_v_which = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "capnp/lib/capnp.pyx":866
 *         try:
 *             which = temp_msg_b.which()
 *             ret[which] = _to_dict(temp_msg_b._get(which), verbose, ordered)             # <<<<<<<<<<<<<<
 *         except KjException:
 *             pass
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_b, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 866, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_which) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_which);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __pyx_f_5capnp_3lib_5capnp__to_dict(__pyx_t_3, __pyx_v_verbose, __pyx_v_ordered); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 866, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_ret, __pyx_v_which, __pyx_t_7) < 0)) __PYX_ERR(0, 866, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "capnp/lib/capnp.pyx":864
 *         else:
 *             ret = {}
 *         try:             # <<<<<<<<<<<<<<
 *             which = temp_msg_b.which()
 *             ret[which] = _to_dict(temp_msg_b._get(which), verbose, ordered)
 */
      }
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L19_try_end;
      __pyx_L14_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "capnp/lib/capnp.pyx":867
 *             which = temp_msg_b.which()
 *             ret[which] = _to_dict(temp_msg_b._get(which), verbose, ordered)
 *         except KjException:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
      __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_3, &__pyx_t_8);
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_KjException); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 867, __pyx_L16_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_15 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_ErrRestore(__pyx_t_7, __pyx_t_3, __pyx_t_8);
      __pyx_t_7 = 0; __pyx_t_3 = 0; __pyx_t_8 = 0;
      if (__pyx_t_15) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L15_exception_handled;
      }
      goto __pyx_L16_except_error;
      __pyx_L16_except_error:;

      /* "capnp/lib/capnp.pyx":864
 *         else:
 *             ret = {}
 *         try:             # <<<<<<<<<<<<<<
 *             which = temp_msg_b.which()
 *             ret[which] = _to_dict(temp_msg_b._get(which), verbose, ordered)
 */
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      goto __pyx_L1_error;
      __pyx_L15_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __pyx_L19_try_end:;
    }

    /* "capnp/lib/capnp.pyx":870
 *             pass
 * 
 *         for field in temp_msg_b.schema.non_union_fields:             # <<<<<<<<<<<<<<
 *             if verbose or temp_msg_b._has(field):
 *                 ret[field] = _to_dict(temp_msg_b._get(field), verbose, ordered)
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_b, __pyx_n_s_schema); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_non_union_fields); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_8 = __pyx_t_3; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0;
      __pyx_t_16 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 870, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_16 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 870, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_16)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 870, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 870, __pyx_L1_error)
          #else
          __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_16(__pyx_t_8);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 870, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":871
 * 
 *         for field in temp_msg_b.schema.non_union_fields:
 *             if verbose or temp_msg_b._has(field):             # <<<<<<<<<<<<<<
 *                 ret[field] = _to_dict(temp_msg_b._get(field), verbose, ordered)
 * 
 */
      __pyx_t_1 = (__pyx_v_verbose != 0);
      if (!__pyx_t_1) {
      } else {
        __pyx_t_2 = __pyx_t_1;
        goto __pyx_L23_bool_binop_done;
      }
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_b, __pyx_n_s_has); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && 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);
        }
      }
      __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_field);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = __pyx_t_1;
      __pyx_L23_bool_binop_done:;
      if (__pyx_t_2) {

        /* "capnp/lib/capnp.pyx":872
 *         for field in temp_msg_b.schema.non_union_fields:
 *             if verbose or temp_msg_b._has(field):
 *                 ret[field] = _to_dict(temp_msg_b._get(field), verbose, ordered)             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_b, __pyx_n_s_get); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 872, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __pyx_f_5capnp_3lib_5capnp__to_dict(__pyx_t_3, __pyx_v_verbose, __pyx_v_ordered); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 872, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_ret, __pyx_v_field, __pyx_t_7) < 0)) __PYX_ERR(0, 872, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "capnp/lib/capnp.pyx":871
 * 
 *         for field in temp_msg_b.schema.non_union_fields:
 *             if verbose or temp_msg_b._has(field):             # <<<<<<<<<<<<<<
 *                 ret[field] = _to_dict(temp_msg_b._get(field), verbose, ordered)
 * 
 */
      }

      /* "capnp/lib/capnp.pyx":870
 *             pass
 * 
 *         for field in temp_msg_b.schema.non_union_fields:             # <<<<<<<<<<<<<<
 *             if verbose or temp_msg_b._has(field):
 *                 ret[field] = _to_dict(temp_msg_b._get(field), verbose, ordered)
 */
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "capnp/lib/capnp.pyx":874
 *                 ret[field] = _to_dict(temp_msg_b._get(field), verbose, ordered)
 * 
 *         return ret             # <<<<<<<<<<<<<<
 *     elif msg_type is _DynamicStructReader or isinstance(msg, _Response):
 *         temp_msg_r = msg
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_ret);
    __pyx_r = __pyx_v_ret;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":858
 *         return [_to_dict(temp_list_rb._get(i), verbose, ordered) for i in range(len(msg))]
 * 
 *     if msg_type is _DynamicStructBuilder or isinstance(msg, _Request):             # <<<<<<<<<<<<<<
 *         temp_msg_b = msg
 *         if ordered:
 */
  }

  /* "capnp/lib/capnp.pyx":875
 * 
 *         return ret
 *     elif msg_type is _DynamicStructReader or isinstance(msg, _Response):             # <<<<<<<<<<<<<<
 *         temp_msg_r = msg
 *         if ordered:
 */
  __pyx_t_1 = (__pyx_v_msg_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader);
  __pyx_t_11 = (__pyx_t_1 != 0);
  if (!__pyx_t_11) {
  } else {
    __pyx_t_2 = __pyx_t_11;
    goto __pyx_L25_bool_binop_done;
  }
  __pyx_t_11 = __Pyx_TypeCheck(__pyx_v_msg, __pyx_ptype_5capnp_3lib_5capnp__Response); 
  __pyx_t_1 = (__pyx_t_11 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L25_bool_binop_done:;
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":876
 *         return ret
 *     elif msg_type is _DynamicStructReader or isinstance(msg, _Response):
 *         temp_msg_r = msg             # <<<<<<<<<<<<<<
 *         if ordered:
 *             ret = _collections.OrderedDict()
 */
    __Pyx_INCREF(__pyx_v_msg);
    __pyx_v_temp_msg_r = __pyx_v_msg;

    /* "capnp/lib/capnp.pyx":877
 *     elif msg_type is _DynamicStructReader or isinstance(msg, _Response):
 *         temp_msg_r = msg
 *         if ordered:             # <<<<<<<<<<<<<<
 *             ret = _collections.OrderedDict()
 *         else:
 */
    __pyx_t_2 = (__pyx_v_ordered != 0);
    if (__pyx_t_2) {

      /* "capnp/lib/capnp.pyx":878
 *         temp_msg_r = msg
 *         if ordered:
 *             ret = _collections.OrderedDict()             # <<<<<<<<<<<<<<
 *         else:
 *             ret = {}
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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);
        }
      }
      __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_ret = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "capnp/lib/capnp.pyx":877
 *     elif msg_type is _DynamicStructReader or isinstance(msg, _Response):
 *         temp_msg_r = msg
 *         if ordered:             # <<<<<<<<<<<<<<
 *             ret = _collections.OrderedDict()
 *         else:
 */
      goto __pyx_L27;
    }

    /* "capnp/lib/capnp.pyx":880
 *             ret = _collections.OrderedDict()
 *         else:
 *             ret = {}             # <<<<<<<<<<<<<<
 *         try:
 *             which = temp_msg_r.which()
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 880, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_ret = __pyx_t_8;
      __pyx_t_8 = 0;
    }
    __pyx_L27:;

    /* "capnp/lib/capnp.pyx":881
 *         else:
 *             ret = {}
 *         try:             # <<<<<<<<<<<<<<
 *             which = temp_msg_r.which()
 *             ret[which] = _to_dict(temp_msg_r._get(which), verbose, ordered)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_12);
      /*try:*/ {

        /* "capnp/lib/capnp.pyx":882
 *             ret = {}
 *         try:
 *             which = temp_msg_r.which()             # <<<<<<<<<<<<<<
 *             ret[which] = _to_dict(temp_msg_r._get(which), verbose, ordered)
 *         except KjException:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_r, __pyx_n_s_which); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L28_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 882, __pyx_L28_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_which = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "capnp/lib/capnp.pyx":883
 *         try:
 *             which = temp_msg_r.which()
 *             ret[which] = _to_dict(temp_msg_r._get(which), verbose, ordered)             # <<<<<<<<<<<<<<
 *         except KjException:
 *             pass
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_r, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 883, __pyx_L28_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_which) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_which);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 883, __pyx_L28_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp__to_dict(__pyx_t_8, __pyx_v_verbose, __pyx_v_ordered); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 883, __pyx_L28_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_ret, __pyx_v_which, __pyx_t_3) < 0)) __PYX_ERR(0, 883, __pyx_L28_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "capnp/lib/capnp.pyx":881
 *         else:
 *             ret = {}
 *         try:             # <<<<<<<<<<<<<<
 *             which = temp_msg_r.which()
 *             ret[which] = _to_dict(temp_msg_r._get(which), verbose, ordered)
 */
      }
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L33_try_end;
      __pyx_L28_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "capnp/lib/capnp.pyx":884
 *             which = temp_msg_r.which()
 *             ret[which] = _to_dict(temp_msg_r._get(which), verbose, ordered)
 *         except KjException:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
      __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_8, &__pyx_t_7);
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_KjException); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 884, __pyx_L30_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_15 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_ErrRestore(__pyx_t_3, __pyx_t_8, __pyx_t_7);
      __pyx_t_3 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0;
      if (__pyx_t_15) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L29_exception_handled;
      }
      goto __pyx_L30_except_error;
      __pyx_L30_except_error:;

      /* "capnp/lib/capnp.pyx":881
 *         else:
 *             ret = {}
 *         try:             # <<<<<<<<<<<<<<
 *             which = temp_msg_r.which()
 *             ret[which] = _to_dict(temp_msg_r._get(which), verbose, ordered)
 */
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      goto __pyx_L1_error;
      __pyx_L29_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);
      __pyx_L33_try_end:;
    }

    /* "capnp/lib/capnp.pyx":887
 *             pass
 * 
 *         for field in temp_msg_r.schema.non_union_fields:             # <<<<<<<<<<<<<<
 *             if verbose or temp_msg_r._has(field):
 *                 ret[field] = _to_dict(temp_msg_r._get(field), verbose, ordered)
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_r, __pyx_n_s_schema); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_non_union_fields); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
      __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
      __pyx_t_16 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 887, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_16 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 887, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    for (;;) {
      if (likely(!__pyx_t_16)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 887, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_8); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 887, __pyx_L1_error)
          #else
          __pyx_t_8 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_16(__pyx_t_7);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 887, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "capnp/lib/capnp.pyx":888
 * 
 *         for field in temp_msg_r.schema.non_union_fields:
 *             if verbose or temp_msg_r._has(field):             # <<<<<<<<<<<<<<
 *                 ret[field] = _to_dict(temp_msg_r._get(field), verbose, ordered)
 * 
 */
      __pyx_t_1 = (__pyx_v_verbose != 0);
      if (!__pyx_t_1) {
      } else {
        __pyx_t_2 = __pyx_t_1;
        goto __pyx_L37_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_r, __pyx_n_s_has); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 888, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_2 = __pyx_t_1;
      __pyx_L37_bool_binop_done:;
      if (__pyx_t_2) {

        /* "capnp/lib/capnp.pyx":889
 *         for field in temp_msg_r.schema.non_union_fields:
 *             if verbose or temp_msg_r._has(field):
 *                 ret[field] = _to_dict(temp_msg_r._get(field), verbose, ordered)             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp_msg_r, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp__to_dict(__pyx_t_8, __pyx_v_verbose, __pyx_v_ordered); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(PyObject_SetItem(__pyx_v_ret, __pyx_v_field, __pyx_t_3) < 0)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "capnp/lib/capnp.pyx":888
 * 
 *         for field in temp_msg_r.schema.non_union_fields:
 *             if verbose or temp_msg_r._has(field):             # <<<<<<<<<<<<<<
 *                 ret[field] = _to_dict(temp_msg_r._get(field), verbose, ordered)
 * 
 */
      }

      /* "capnp/lib/capnp.pyx":887
 *             pass
 * 
 *         for field in temp_msg_r.schema.non_union_fields:             # <<<<<<<<<<<<<<
 *             if verbose or temp_msg_r._has(field):
 *                 ret[field] = _to_dict(temp_msg_r._get(field), verbose, ordered)
 */
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "capnp/lib/capnp.pyx":891
 *                 ret[field] = _to_dict(temp_msg_r._get(field), verbose, ordered)
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     if isinstance(msg, (_DynamicStructBuilder, _DynamicStructReader)):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_ret);
    __pyx_r = __pyx_v_ret;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":875
 * 
 *         return ret
 *     elif msg_type is _DynamicStructReader or isinstance(msg, _Response):             # <<<<<<<<<<<<<<
 *         temp_msg_r = msg
 *         if ordered:
 */
  }

  /* "capnp/lib/capnp.pyx":893
 *         return ret
 * 
 *     if isinstance(msg, (_DynamicStructBuilder, _DynamicStructReader)):             # <<<<<<<<<<<<<<
 *         return msg.to_dict(verbose, ordered)
 * 
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_msg, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder); 
  __pyx_t_11 = (__pyx_t_1 != 0);
  if (!__pyx_t_11) {
  } else {
    __pyx_t_2 = __pyx_t_11;
    goto __pyx_L40_bool_binop_done;
  }
  __pyx_t_11 = __Pyx_TypeCheck(__pyx_v_msg, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader); 
  __pyx_t_1 = (__pyx_t_11 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L40_bool_binop_done:;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":894
 * 
 *     if isinstance(msg, (_DynamicStructBuilder, _DynamicStructReader)):
 *         return msg.to_dict(verbose, ordered)             # <<<<<<<<<<<<<<
 * 
 *     if msg_type is _DynamicEnum:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_msg, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_verbose); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_ordered); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = NULL;
    __pyx_t_15 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_15 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 2+__pyx_t_15); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_17 = PyTuple_New(2+__pyx_t_15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_17);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_15, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_15, __pyx_t_9);
      __pyx_t_8 = 0;
      __pyx_t_9 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_17, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":893
 *         return ret
 * 
 *     if isinstance(msg, (_DynamicStructBuilder, _DynamicStructReader)):             # <<<<<<<<<<<<<<
 *         return msg.to_dict(verbose, ordered)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":896
 *         return msg.to_dict(verbose, ordered)
 * 
 *     if msg_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         return str(msg)
 * 
 */
  __pyx_t_1 = (__pyx_v_msg_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":897
 * 
 *     if msg_type is _DynamicEnum:
 *         return str(msg)             # <<<<<<<<<<<<<<
 * 
 *     return msg
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":896
 *         return msg.to_dict(verbose, ordered)
 * 
 *     if msg_type is _DynamicEnum:             # <<<<<<<<<<<<<<
 *         return str(msg)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":899
 *         return str(msg)
 * 
 *     return msg             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_msg);
  __pyx_r = __pyx_v_msg;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":846
 * cdef _DynamicStructBuilder temp_msg_b
 * cdef _DynamicStructReader temp_msg_r
 * cdef _to_dict(msg, bint verbose, bint ordered):             # <<<<<<<<<<<<<<
 *     msg_type = type(msg)
 *     if msg_type is _DynamicListBuilder:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("capnp.lib.capnp._to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_msg_type);
  __Pyx_XDECREF(__pyx_v_temp_list_b);
  __Pyx_XDECREF(__pyx_v_temp_list_r);
  __Pyx_XDECREF(__pyx_v_temp_list_rb);
  __Pyx_XDECREF(__pyx_v_temp_msg_b);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_which);
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XDECREF(__pyx_v_temp_msg_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":902
 * 
 * 
 * cdef _from_list(_DynamicListBuilder msg, list d):             # <<<<<<<<<<<<<<
 *     for i, x in enumerate(d):
 *         msg._set(i, x)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp__from_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_msg, PyObject *__pyx_v_d) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_list", 0);

  /* "capnp/lib/capnp.pyx":903
 * 
 * cdef _from_list(_DynamicListBuilder msg, list d):
 *     for i, x in enumerate(d):             # <<<<<<<<<<<<<<
 *         msg._set(i, x)
 * 
 */
  __pyx_t_1 = 0;
  __pyx_t_2 = __pyx_v_d; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 903, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 903, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_v_i = __pyx_t_1;
    __pyx_t_1 = (__pyx_t_1 + 1);

    /* "capnp/lib/capnp.pyx":904
 * cdef _from_list(_DynamicListBuilder msg, list d):
 *     for i, x in enumerate(d):
 *         msg._set(i, x)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_msg->__pyx_vtab)->_set(__pyx_v_msg, __pyx_t_4, __pyx_v_x, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __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;

    /* "capnp/lib/capnp.pyx":903
 * 
 * cdef _from_list(_DynamicListBuilder msg, list d):
 *     for i, x in enumerate(d):             # <<<<<<<<<<<<<<
 *         msg._set(i, x)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":902
 * 
 * 
 * cdef _from_list(_DynamicListBuilder msg, list d):             # <<<<<<<<<<<<<<
 *     for i, x in enumerate(d):
 *         msg._set(i, x)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._from_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":907
 * 
 * 
 * cdef _from_tuple(_DynamicListBuilder msg, tuple d):             # <<<<<<<<<<<<<<
 *     for i, x in enumerate(d):
 *         msg._set(i, x)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp__from_tuple(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *__pyx_v_msg, PyObject *__pyx_v_d) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_tuple", 0);

  /* "capnp/lib/capnp.pyx":908
 * 
 * cdef _from_tuple(_DynamicListBuilder msg, tuple d):
 *     for i, x in enumerate(d):             # <<<<<<<<<<<<<<
 *         msg._set(i, x)
 * 
 */
  __pyx_t_1 = 0;
  __pyx_t_2 = __pyx_v_d; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 908, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_v_i = __pyx_t_1;
    __pyx_t_1 = (__pyx_t_1 + 1);

    /* "capnp/lib/capnp.pyx":909
 * cdef _from_tuple(_DynamicListBuilder msg, tuple d):
 *     for i, x in enumerate(d):
 *         msg._set(i, x)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_v_msg->__pyx_vtab)->_set(__pyx_v_msg, __pyx_t_4, __pyx_v_x, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 909, __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;

    /* "capnp/lib/capnp.pyx":908
 * 
 * cdef _from_tuple(_DynamicListBuilder msg, tuple d):
 *     for i, x in enumerate(d):             # <<<<<<<<<<<<<<
 *         msg._set(i, x)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":907
 * 
 * 
 * cdef _from_tuple(_DynamicListBuilder msg, tuple d):             # <<<<<<<<<<<<<<
 *     for i, x in enumerate(d):
 *         msg._set(i, x)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._from_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":913
 * 
 * cdef class _DynamicEnum:
 *     cdef _init(self, capnp.DynamicEnum other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_12_DynamicEnum__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self,  ::capnp::DynamicEnum __pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":914
 * cdef class _DynamicEnum:
 *     cdef _init(self, capnp.DynamicEnum other, object parent):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":915
 *     cdef _init(self, capnp.DynamicEnum other, object parent):
 *         self.thisptr = other
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":916
 *         self.thisptr = other
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef _as_str(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":913
 * 
 * cdef class _DynamicEnum:
 *     cdef _init(self, capnp.DynamicEnum other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":918
 *         return self
 * 
 *     cpdef _as_str(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return <char*>helpers.fixMaybe(self.thisptr.getEnumerant()).getProto().getName().cStr()
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_1_as_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_DynamicEnum__as_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::EnumSchema::Enumerant __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_as_str", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_1_as_str)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":919
 * 
 *     cpdef _as_str(self) except +reraise_kj_exception:
 *         return <char*>helpers.fixMaybe(self.thisptr.getEnumerant()).getProto().getName().cStr()             # <<<<<<<<<<<<<<
 * 
 *     property raw:
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = fixMaybe(__pyx_v_self->thisptr.getEnumerant());
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 919, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *)__pyx_t_5.getProto().getName().cStr())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":918
 *         return self
 * 
 *     cpdef _as_str(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return <char*>helpers.fixMaybe(self.thisptr.getEnumerant()).getProto().getName().cStr()
 * 
 */

  /* 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("capnp.lib.capnp._DynamicEnum._as_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_1_as_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_DynamicEnum__as_str[] = "_DynamicEnum._as_str(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_1_as_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_as_str (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum__as_str(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum__as_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__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("_as_str", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_12_DynamicEnum__as_str(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 918, __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("capnp.lib.capnp._DynamicEnum._as_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":923
 *     property raw:
 *         """A property that returns the raw int of the enum"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getRaw()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_3raw_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_3raw_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_3raw___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_3raw___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":924
 *         """A property that returns the raw int of the enum"""
 *         def __get__(self):
 *             return self.thisptr.getRaw()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint16_t(__pyx_v_self->thisptr.getRaw()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":923
 *     property raw:
 *         """A property that returns the raw int of the enum"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.getRaw()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnum.raw.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":926
 *             return self.thisptr.getRaw()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self._as_str()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_2__str__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_2__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__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("__str__", 0);

  /* "capnp/lib/capnp.pyx":927
 * 
 *     def __str__(self):
 *         return self._as_str()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self->__pyx_vtab)->_as_str(__pyx_v_self, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 927, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":926
 *             return self.thisptr.getRaw()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self._as_str()
 * 
 */

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

/* "capnp/lib/capnp.pyx":929
 *         return self._as_str()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s enum>' % str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_4__repr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_4__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__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);

  /* "capnp/lib/capnp.pyx":930
 * 
 *     def __repr__(self):
 *         return '<%s enum>' % str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(_DynamicEnum self, right, int op):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_enum, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 930, __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;

  /* "capnp/lib/capnp.pyx":929
 *         return self._as_str()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s enum>' % str(self)
 * 
 */

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

/* "capnp/lib/capnp.pyx":932
 *         return '<%s enum>' % str(self)
 * 
 *     def __richcmp__(_DynamicEnum self, right, int op):             # <<<<<<<<<<<<<<
 *         if isinstance(right, basestring):
 *             left = self._as_str()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_right, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_right, int __pyx_v_op) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_6__richcmp__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self), ((PyObject *)__pyx_v_right), ((int)__pyx_v_op));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_6__richcmp__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self, PyObject *__pyx_v_right, int __pyx_v_op) {
  PyObject *__pyx_v_left = NULL;
  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("__richcmp__", 0);

  /* "capnp/lib/capnp.pyx":933
 * 
 *     def __richcmp__(_DynamicEnum self, right, int op):
 *         if isinstance(right, basestring):             # <<<<<<<<<<<<<<
 *             left = self._as_str()
 *         else:
 */
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_right); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":934
 *     def __richcmp__(_DynamicEnum self, right, int op):
 *         if isinstance(right, basestring):
 *             left = self._as_str()             # <<<<<<<<<<<<<<
 *         else:
 *             left = self.thisptr.getRaw()
 */
    try {
      __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self->__pyx_vtab)->_as_str(__pyx_v_self, 0);
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 934, __pyx_L1_error)
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 934, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_left = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":933
 * 
 *     def __richcmp__(_DynamicEnum self, right, int op):
 *         if isinstance(right, basestring):             # <<<<<<<<<<<<<<
 *             left = self._as_str()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":936
 *             left = self._as_str()
 *         else:
 *             left = self.thisptr.getRaw()             # <<<<<<<<<<<<<<
 * 
 *         if op == 2: # ==
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyInt_From_uint16_t(__pyx_v_self->thisptr.getRaw()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_left = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":938
 *             left = self.thisptr.getRaw()
 * 
 *         if op == 2: # ==             # <<<<<<<<<<<<<<
 *             return left == right
 *         elif op == 3: # !=
 */
  switch (__pyx_v_op) {
    case 2:

    /* "capnp/lib/capnp.pyx":939
 * 
 *         if op == 2: # ==
 *             return left == right             # <<<<<<<<<<<<<<
 *         elif op == 3: # !=
 *             return left != right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 939, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":938
 *             left = self.thisptr.getRaw()
 * 
 *         if op == 2: # ==             # <<<<<<<<<<<<<<
 *             return left == right
 *         elif op == 3: # !=
 */
    break;
    case 3:

    /* "capnp/lib/capnp.pyx":941
 *             return left == right
 *         elif op == 3: # !=
 *             return left != right             # <<<<<<<<<<<<<<
 *         elif op == 0: # <
 *             return left < right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":940
 *         if op == 2: # ==
 *             return left == right
 *         elif op == 3: # !=             # <<<<<<<<<<<<<<
 *             return left != right
 *         elif op == 0: # <
 */
    break;
    case 0:

    /* "capnp/lib/capnp.pyx":943
 *             return left != right
 *         elif op == 0: # <
 *             return left < right             # <<<<<<<<<<<<<<
 *         elif op == 1: # <=
 *             return left <= right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":942
 *         elif op == 3: # !=
 *             return left != right
 *         elif op == 0: # <             # <<<<<<<<<<<<<<
 *             return left < right
 *         elif op == 1: # <=
 */
    break;
    case 1:

    /* "capnp/lib/capnp.pyx":945
 *             return left < right
 *         elif op == 1: # <=
 *             return left <= right             # <<<<<<<<<<<<<<
 *         elif op == 4: # >
 *             return left > right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":944
 *         elif op == 0: # <
 *             return left < right
 *         elif op == 1: # <=             # <<<<<<<<<<<<<<
 *             return left <= right
 *         elif op == 4: # >
 */
    break;
    case 4:

    /* "capnp/lib/capnp.pyx":947
 *             return left <= right
 *         elif op == 4: # >
 *             return left > right             # <<<<<<<<<<<<<<
 *         elif op == 5: # >=
 *             return left >= right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":946
 *         elif op == 1: # <=
 *             return left <= right
 *         elif op == 4: # >             # <<<<<<<<<<<<<<
 *             return left > right
 *         elif op == 5: # >=
 */
    break;
    case 5:

    /* "capnp/lib/capnp.pyx":949
 *             return left > right
 *         elif op == 5: # >=
 *             return left >= right             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(_DynamicEnum self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":948
 *         elif op == 4: # >
 *             return left > right
 *         elif op == 5: # >=             # <<<<<<<<<<<<<<
 *             return left >= right
 * 
 */
    break;
    default: break;
  }

  /* "capnp/lib/capnp.pyx":932
 *         return '<%s enum>' % str(self)
 * 
 *     def __richcmp__(_DynamicEnum self, right, int op):             # <<<<<<<<<<<<<<
 *         if isinstance(right, basestring):
 *             left = self._as_str()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnum.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_left);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":951
 *             return left >= right
 * 
 *     def __hash__(_DynamicEnum self):             # <<<<<<<<<<<<<<
 *         return hash(self._as_str())
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_8__hash__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self));

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

static Py_hash_t __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_8__hash__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_hash_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "capnp/lib/capnp.pyx":952
 * 
 *     def __hash__(_DynamicEnum self):
 *         return hash(self._as_str())             # <<<<<<<<<<<<<<
 * 
 * 
 */
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self->__pyx_vtab)->_as_str(__pyx_v_self, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 952, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":951
 *             return left >= right
 * 
 *     def __hash__(_DynamicEnum self):             # <<<<<<<<<<<<<<
 *         return hash(self._as_str())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnum.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pxd":115
 * cdef class _DynamicEnum:
 *     cdef capnp.DynamicEnum thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, capnp.DynamicEnum other, object parent)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_DynamicEnum_10__reduce_cython__[] = "_DynamicEnum.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_10__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_DynamicEnum_12__setstate_cython__[] = "_DynamicEnum.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_12__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_DynamicEnum_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":956
 * 
 * cdef class _DynamicEnumField:
 *     cdef _init(self, proto):             # <<<<<<<<<<<<<<
 *         self.thisptr = proto
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_17_DynamicEnumField__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self, PyObject *__pyx_v_proto) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":957
 * cdef class _DynamicEnumField:
 *     cdef _init(self, proto):
 *         self.thisptr = proto             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_proto);
  __Pyx_GIVEREF(__pyx_v_proto);
  __Pyx_GOTREF(__pyx_v_self->thisptr);
  __Pyx_DECREF(__pyx_v_self->thisptr);
  __pyx_v_self->thisptr = __pyx_v_proto;

  /* "capnp/lib/capnp.pyx":958
 *     cdef _init(self, proto):
 *         self.thisptr = proto
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property raw:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":956
 * 
 * cdef class _DynamicEnumField:
 *     cdef _init(self, proto):             # <<<<<<<<<<<<<<
 *         self.thisptr = proto
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":962
 *     property raw:
 *         """A property that returns the raw int of the enum"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.discriminantValue
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_3raw_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_3raw_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_3raw___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_3raw___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":963
 *         """A property that returns the raw int of the enum"""
 *         def __get__(self):
 *             return self.thisptr.discriminantValue             # <<<<<<<<<<<<<<
 * 
 *     cpdef _str(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->thisptr, __pyx_n_s_discriminantValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":962
 *     property raw:
 *         """A property that returns the raw int of the enum"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.thisptr.discriminantValue
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnumField.raw.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":965
 *             return self.thisptr.discriminantValue
 * 
 *     cpdef _str(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.name
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_1_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_17_DynamicEnumField__str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_str", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_1_str)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 965, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":966
 * 
 *     cpdef _str(self):
 *         return self.thisptr.name             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->thisptr, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":965
 *             return self.thisptr.discriminantValue
 * 
 *     cpdef _str(self):             # <<<<<<<<<<<<<<
 *         return self.thisptr.name
 * 
 */

  /* 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("capnp.lib.capnp._DynamicEnumField._str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_1_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_17_DynamicEnumField__str[] = "_DynamicEnumField._str(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_1_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_str (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField__str(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField__str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__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("_str", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_17_DynamicEnumField__str(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __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("capnp.lib.capnp._DynamicEnumField._str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":968
 *         return self.thisptr.name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self._str()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_2__str__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_2__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__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("__str__", 0);

  /* "capnp/lib/capnp.pyx":969
 * 
 *     def __str__(self):
 *         return self._str()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_self->__pyx_vtab)->_str(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":968
 *         return self.thisptr.name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self._str()
 * 
 */

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

/* "capnp/lib/capnp.pyx":971
 *         return self._str()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s which-enum>' % str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_4__repr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_4__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__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);

  /* "capnp/lib/capnp.pyx":972
 * 
 *     def __repr__(self):
 *         return '<%s which-enum>' % str(self)             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(_DynamicEnumField self, right, int op):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_which_enum, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __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;

  /* "capnp/lib/capnp.pyx":971
 *         return self._str()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s which-enum>' % str(self)
 * 
 */

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

/* "capnp/lib/capnp.pyx":974
 *         return '<%s which-enum>' % str(self)
 * 
 *     def __richcmp__(_DynamicEnumField self, right, int op):             # <<<<<<<<<<<<<<
 *         if isinstance(right, basestring):
 *             left = self.thisptr.name
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_right, int __pyx_v_op); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_right, int __pyx_v_op) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_6__richcmp__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_self), ((PyObject *)__pyx_v_right), ((int)__pyx_v_op));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_6__richcmp__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self, PyObject *__pyx_v_right, int __pyx_v_op) {
  PyObject *__pyx_v_left = NULL;
  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("__richcmp__", 0);

  /* "capnp/lib/capnp.pyx":975
 * 
 *     def __richcmp__(_DynamicEnumField self, right, int op):
 *         if isinstance(right, basestring):             # <<<<<<<<<<<<<<
 *             left = self.thisptr.name
 *         else:
 */
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_right); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":976
 *     def __richcmp__(_DynamicEnumField self, right, int op):
 *         if isinstance(right, basestring):
 *             left = self.thisptr.name             # <<<<<<<<<<<<<<
 *         else:
 *             left = self.thisptr.discriminantValue
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->thisptr, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_left = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":975
 * 
 *     def __richcmp__(_DynamicEnumField self, right, int op):
 *         if isinstance(right, basestring):             # <<<<<<<<<<<<<<
 *             left = self.thisptr.name
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":978
 *             left = self.thisptr.name
 *         else:
 *             left = self.thisptr.discriminantValue             # <<<<<<<<<<<<<<
 * 
 *         if op == 2: # ==
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->thisptr, __pyx_n_s_discriminantValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_left = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":980
 *             left = self.thisptr.discriminantValue
 * 
 *         if op == 2: # ==             # <<<<<<<<<<<<<<
 *             return left == right
 *         elif op == 3: # !=
 */
  switch (__pyx_v_op) {
    case 2:

    /* "capnp/lib/capnp.pyx":981
 * 
 *         if op == 2: # ==
 *             return left == right             # <<<<<<<<<<<<<<
 *         elif op == 3: # !=
 *             return left != right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":980
 *             left = self.thisptr.discriminantValue
 * 
 *         if op == 2: # ==             # <<<<<<<<<<<<<<
 *             return left == right
 *         elif op == 3: # !=
 */
    break;
    case 3:

    /* "capnp/lib/capnp.pyx":983
 *             return left == right
 *         elif op == 3: # !=
 *             return left != right             # <<<<<<<<<<<<<<
 *         elif op == 0: # <
 *             return left < right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":982
 *         if op == 2: # ==
 *             return left == right
 *         elif op == 3: # !=             # <<<<<<<<<<<<<<
 *             return left != right
 *         elif op == 0: # <
 */
    break;
    case 0:

    /* "capnp/lib/capnp.pyx":985
 *             return left != right
 *         elif op == 0: # <
 *             return left < right             # <<<<<<<<<<<<<<
 *         elif op == 1: # <=
 *             return left <= right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 985, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":984
 *         elif op == 3: # !=
 *             return left != right
 *         elif op == 0: # <             # <<<<<<<<<<<<<<
 *             return left < right
 *         elif op == 1: # <=
 */
    break;
    case 1:

    /* "capnp/lib/capnp.pyx":987
 *             return left < right
 *         elif op == 1: # <=
 *             return left <= right             # <<<<<<<<<<<<<<
 *         elif op == 4: # >
 *             return left > right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":986
 *         elif op == 0: # <
 *             return left < right
 *         elif op == 1: # <=             # <<<<<<<<<<<<<<
 *             return left <= right
 *         elif op == 4: # >
 */
    break;
    case 4:

    /* "capnp/lib/capnp.pyx":989
 *             return left <= right
 *         elif op == 4: # >
 *             return left > right             # <<<<<<<<<<<<<<
 *         elif op == 5: # >=
 *             return left >= right
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 989, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":988
 *         elif op == 1: # <=
 *             return left <= right
 *         elif op == 4: # >             # <<<<<<<<<<<<<<
 *             return left > right
 *         elif op == 5: # >=
 */
    break;
    case 5:

    /* "capnp/lib/capnp.pyx":991
 *             return left > right
 *         elif op == 5: # >=
 *             return left >= right             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 991, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":990
 *         elif op == 4: # >
 *             return left > right
 *         elif op == 5: # >=             # <<<<<<<<<<<<<<
 *             return left >= right
 * 
 */
    break;
    default: break;
  }

  /* "capnp/lib/capnp.pyx":974
 *         return '<%s which-enum>' % str(self)
 * 
 *     def __richcmp__(_DynamicEnumField self, right, int op):             # <<<<<<<<<<<<<<
 *         if isinstance(right, basestring):
 *             left = self.thisptr.name
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnumField.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_left);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":993
 *             return left >= right
 * 
 *     def __call__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_9__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_9__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__call__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 0))) return NULL;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_8__call__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_8__call__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__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("__call__", 0);

  /* "capnp/lib/capnp.pyx":994
 * 
 *     def __call__(self):
 *         return str(self)             # <<<<<<<<<<<<<<
 * 
 * cdef class _MessageSize:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":993
 *             return left >= right
 * 
 *     def __call__(self):             # <<<<<<<<<<<<<<
 *         return str(self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnumField.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_17_DynamicEnumField_10__reduce_cython__[] = "_DynamicEnumField.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_10__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_10__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.thisptr,)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->thisptr);
  __Pyx_GIVEREF(__pyx_v_self->thisptr);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->thisptr);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.thisptr,)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.thisptr,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.thisptr is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.thisptr,)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.thisptr is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, None), state
 */
  /*else*/ {
    __pyx_t_3 = (__pyx_v_self->thisptr != Py_None);
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.thisptr is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.thisptr is not None
 *     if use_setstate:
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__DynamicEnumField); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_224926043);
    __Pyx_GIVEREF(__pyx_int_224926043);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_224926043);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.thisptr is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, None), state
 *     else:
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__DynamicEnumField__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle__DynamicEnumField); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_224926043);
    __Pyx_GIVEREF(__pyx_int_224926043);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_224926043);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnumField.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__DynamicEnumField__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_17_DynamicEnumField_12__setstate_cython__[] = "_DynamicEnumField.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_12__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_DynamicEnumField_12__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__DynamicEnumField__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicEnumField__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__DynamicEnumField, (type(self), 0xd68195b, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__DynamicEnumField__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicEnumField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1000
 *     cdef public uint cap_count
 * 
 *     def __init__(self, uint64_t word_count, uint cap_count):             # <<<<<<<<<<<<<<
 *         self.word_count = word_count
 *         self.cap_count = cap_count
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  uint64_t __pyx_v_word_count;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_cap_count;
  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_word_count,&__pyx_n_s_cap_count,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_word_count)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cap_count)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1000, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1000, __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_word_count = __Pyx_PyInt_As_uint64_t(values[0]); if (unlikely((__pyx_v_word_count == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L3_error)
    __pyx_v_cap_count = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_cap_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1000, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._MessageSize.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_MessageSize___init__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *)__pyx_v_self), __pyx_v_word_count, __pyx_v_cap_count);

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

static int __pyx_pf_5capnp_3lib_5capnp_12_MessageSize___init__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self, uint64_t __pyx_v_word_count, __pyx_t_5capnp_8includes_5types_uint __pyx_v_cap_count) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":1001
 * 
 *     def __init__(self, uint64_t word_count, uint cap_count):
 *         self.word_count = word_count             # <<<<<<<<<<<<<<
 *         self.cap_count = cap_count
 * 
 */
  __pyx_v_self->word_count = __pyx_v_word_count;

  /* "capnp/lib/capnp.pyx":1002
 *     def __init__(self, uint64_t word_count, uint cap_count):
 *         self.word_count = word_count
 *         self.cap_count = cap_count             # <<<<<<<<<<<<<<
 * 
 * if getattr(_sys, 'subversion', [''])[0] == 'PyPy':
 */
  __pyx_v_self->cap_count = __pyx_v_cap_count;

  /* "capnp/lib/capnp.pyx":1000
 *     cdef public uint cap_count
 * 
 *     def __init__(self, uint64_t word_count, uint cap_count):             # <<<<<<<<<<<<<<
 *         self.word_count = word_count
 *         self.cap_count = cap_count
 */

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

/* "capnp/lib/capnp.pyx":997
 * 
 * cdef class _MessageSize:
 *     cdef public uint64_t word_count             # <<<<<<<<<<<<<<
 *     cdef public uint cap_count
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_10word_count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_10word_count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_10word_count___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_MessageSize_10word_count___get__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->word_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __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("capnp.lib.capnp._MessageSize.word_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_10word_count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_10word_count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_10word_count_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_10word_count_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  uint64_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_value); if (unlikely((__pyx_t_1 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
  __pyx_v_self->word_count = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._MessageSize.word_count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":998
 * cdef class _MessageSize:
 *     cdef public uint64_t word_count
 *     cdef public uint cap_count             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, uint64_t word_count, uint cap_count):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_9cap_count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_9cap_count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_9cap_count___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_MessageSize_9cap_count___get__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->cap_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __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("capnp.lib.capnp._MessageSize.cap_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_9cap_count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_9cap_count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_9cap_count_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_9cap_count_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
  __pyx_v_self->cap_count = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._MessageSize.cap_count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_MessageSize_2__reduce_cython__[] = "_MessageSize.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_MessageSize_2__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.cap_count, self.word_count)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->cap_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->word_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.cap_count, self.word_count)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self.cap_count, self.word_count)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.cap_count, self.word_count)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle__MessageSize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_220006191);
    __Pyx_GIVEREF(__pyx_int_220006191);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_220006191);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, None), state
 *     else:
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__MessageSize__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle__MessageSize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_220006191);
    __Pyx_GIVEREF(__pyx_int_220006191);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_220006191);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._MessageSize.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__MessageSize__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_MessageSize_4__setstate_cython__[] = "_MessageSize.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_MessageSize_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_MessageSize_4__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__MessageSize__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__MessageSize__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__MessageSize, (type(self), 0xd1d072f, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__MessageSize__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MessageSize.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1007
 *     from pickle_helper import _struct_reducer
 * else:
 *     def _struct_reducer(schema_id, data):             # <<<<<<<<<<<<<<
 *         return _global_schema_parser.modules_by_id[schema_id].from_bytes(data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_struct_reducer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_6_struct_reducer[] = "_struct_reducer(schema_id, data)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_7_struct_reducer = {"_struct_reducer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_7_struct_reducer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_6_struct_reducer};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_struct_reducer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_schema_id = 0;
  PyObject *__pyx_v_data = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_struct_reducer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_schema_id,&__pyx_n_s_data,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_struct_reducer", 1, 2, 2, 1); __PYX_ERR(0, 1007, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_struct_reducer") < 0)) __PYX_ERR(0, 1007, __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_schema_id = values[0];
    __pyx_v_data = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_struct_reducer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1007, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._struct_reducer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_6_struct_reducer(__pyx_self, __pyx_v_schema_id, __pyx_v_data);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_6_struct_reducer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_schema_id, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_struct_reducer", 0);

  /* "capnp/lib/capnp.pyx":1008
 * else:
 *     def _struct_reducer(schema_id, data):
 *         return _global_schema_parser.modules_by_id[schema_id].from_bytes(data)             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicStructReader:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_global_schema_parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_modules_by_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_schema_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_from_bytes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1007
 *     from pickle_helper import _struct_reducer
 * else:
 *     def _struct_reducer(schema_id, data):             # <<<<<<<<<<<<<<
 *         return _global_schema_parser.modules_by_id[schema_id].from_bytes(data)
 * 
 */

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

/* "capnp/lib/capnp.pyx":1019
 *         print getattr(person, 'field-with-hyphens') # for names that are invalid for python, use getattr
 *     """
 *     cdef _init(self, C_DynamicStruct.Reader other, object parent, bint isRoot=False, bint tryRegistry = True):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self,  ::capnp::DynamicStruct::Reader __pyx_v_other, PyObject *__pyx_v_parent, struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader__init *__pyx_optional_args) {
  int __pyx_v_isRoot = ((int)0);
  int __pyx_v_tryRegistry = ((int)1);
  PyObject *__pyx_v_registered_type = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_isRoot = __pyx_optional_args->isRoot;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_tryRegistry = __pyx_optional_args->tryRegistry;
      }
    }
  }

  /* "capnp/lib/capnp.pyx":1020
 *     """
 *     cdef _init(self, C_DynamicStruct.Reader other, object parent, bint isRoot=False, bint tryRegistry = True):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         self.is_root = isRoot
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":1021
 *     cdef _init(self, C_DynamicStruct.Reader other, object parent, bint isRoot=False, bint tryRegistry = True):
 *         self.thisptr = other
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         self.is_root = isRoot
 *         self._schema = None
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":1022
 *         self.thisptr = other
 *         self._parent = parent
 *         self.is_root = isRoot             # <<<<<<<<<<<<<<
 *         self._schema = None
 * 
 */
  __pyx_v_self->is_root = __pyx_v_isRoot;

  /* "capnp/lib/capnp.pyx":1023
 *         self._parent = parent
 *         self.is_root = isRoot
 *         self._schema = None             # <<<<<<<<<<<<<<
 * 
 *         if tryRegistry and len(_type_registry) > 0:
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_schema);
  __Pyx_DECREF(__pyx_v_self->_schema);
  __pyx_v_self->_schema = Py_None;

  /* "capnp/lib/capnp.pyx":1025
 *         self._schema = None
 * 
 *         if tryRegistry and len(_type_registry) > 0:             # <<<<<<<<<<<<<<
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:
 */
  __pyx_t_2 = (__pyx_v_tryRegistry != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __pyx_v_5capnp_3lib_5capnp__type_registry;
  __Pyx_INCREF(__pyx_t_3);
  if (unlikely(__pyx_t_3 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1025, __pyx_L1_error)
  }
  __pyx_t_4 = PyDict_Size(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((__pyx_t_4 > 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":1026
 * 
 *         if tryRegistry and len(_type_registry) > 0:
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)             # <<<<<<<<<<<<<<
 *             if registered_type:
 *                 return registered_type[0](self)
 */
    if (unlikely(__pyx_v_5capnp_3lib_5capnp__type_registry == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 1026, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->thisptr.getSchema().getProto().getId()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_5capnp_3lib_5capnp__type_registry, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1026, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_registered_type = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":1027
 *         if tryRegistry and len(_type_registry) > 0:
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:             # <<<<<<<<<<<<<<
 *                 return registered_type[0](self)
 *         return self
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_registered_type); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1027, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "capnp/lib/capnp.pyx":1028
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:
 *                 return registered_type[0](self)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_registered_type, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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);
        }
      }
      __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1028, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "capnp/lib/capnp.pyx":1027
 *         if tryRegistry and len(_type_registry) > 0:
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:             # <<<<<<<<<<<<<<
 *                 return registered_type[0](self)
 *         return self
 */
    }

    /* "capnp/lib/capnp.pyx":1025
 *         self._schema = None
 * 
 *         if tryRegistry and len(_type_registry) > 0:             # <<<<<<<<<<<<<<
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:
 */
  }

  /* "capnp/lib/capnp.pyx":1029
 *             if registered_type:
 *                 return registered_type[0](self)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get(self, field):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1019
 *         print getattr(person, 'field-with-hyphens') # for names that are invalid for python, use getattr
 *     """
 *     cdef _init(self, C_DynamicStruct.Reader other, object parent, bint isRoot=False, bint tryRegistry = True):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_registered_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1031
 *         return self
 * 
 *     cpdef _get(self, field):             # <<<<<<<<<<<<<<
 *         return to_python_reader(self.thisptr.get(field), self)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_1_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
   ::capnp::DynamicValue::Reader __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_1_get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1032
 * 
 *     cpdef _get(self, field):
 *         return to_python_reader(self.thisptr.get(field), self)             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, field):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1032, __pyx_L1_error)
  try {
    __pyx_t_6 = __pyx_v_self->thisptr.get(__pyx_t_5);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1032, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_to_python_reader((( ::capnp::DynamicValue::Reader)__pyx_t_6), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1031
 *         return self
 * 
 *     cpdef _get(self, field):             # <<<<<<<<<<<<<<
 *         return to_python_reader(self.thisptr.get(field), self)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructReader._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_1_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader__get[] = "_DynamicStructReader._get(self, field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_1_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader__get(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__get(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __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("capnp.lib.capnp._DynamicStructReader._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1034
 *         return to_python_reader(self.thisptr.get(field), self)
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return self._get(field)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_2__getattr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_2__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "capnp/lib/capnp.pyx":1035
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":1036
 *     def __getattr__(self, field):
 *         try:
 *             return self._get(field)             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_field, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1036, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":1035
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1037
 *         try:
 *             return self._get(field)
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 */
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_KjException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1037, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 1037, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;

      /* "capnp/lib/capnp.pyx":1038
 *             return self._get(field)
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get_by_field(self, _StructSchemaField field):
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_to_python); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1038, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1038, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1038, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1038, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1038, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1038, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_7, Py_None, __pyx_t_11, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(0, 1038, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":1035
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":1034
 *         return to_python_reader(self.thisptr.get(field), self)
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return self._get(field)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1040
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 *     cpdef _get_by_field(self, _StructSchemaField field):             # <<<<<<<<<<<<<<
 *         return to_python_reader(self.thisptr.getByField(field.thisptr), self)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_5_get_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__get_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::DynamicValue::Reader __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_by_field", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_by_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_5_get_by_field)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_field)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_field));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1041
 * 
 *     cpdef _get_by_field(self, _StructSchemaField field):
 *         return to_python_reader(self.thisptr.getByField(field.thisptr), self)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _has(self, field):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.get(__pyx_v_field->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1041, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_to_python_reader((( ::capnp::DynamicValue::Reader)__pyx_t_5), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1040
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 *     cpdef _get_by_field(self, _StructSchemaField field):             # <<<<<<<<<<<<<<
 *         return to_python_reader(self.thisptr.getByField(field.thisptr), self)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructReader._get_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_5_get_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_4_get_by_field[] = "_DynamicStructReader._get_by_field(self, _StructSchemaField field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_5_get_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_by_field (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_ptype_5capnp_3lib_5capnp__StructSchemaField, 1, "field", 0))) __PYX_ERR(0, 1040, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_4_get_by_field(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_4_get_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_by_field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__get_by_field(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __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("capnp.lib.capnp._DynamicStructReader._get_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1043
 *         return to_python_reader(self.thisptr.getByField(field.thisptr), self)
 * 
 *     cpdef _has(self, field):             # <<<<<<<<<<<<<<
 *         return self.thisptr.has(field)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_has(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__has(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_has", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_has)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1044
 * 
 *     cpdef _has(self, field):
 *         return self.thisptr.has(field)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _has_by_field(self, _StructSchemaField field):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1044, __pyx_L1_error)
  try {
    __pyx_t_6 = __pyx_v_self->thisptr.has(__pyx_t_5);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1044, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1043
 *         return to_python_reader(self.thisptr.getByField(field.thisptr), self)
 * 
 *     cpdef _has(self, field):             # <<<<<<<<<<<<<<
 *         return self.thisptr.has(field)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructReader._has", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_has(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_6_has[] = "_DynamicStructReader._has(self, field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_has(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_has (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_6_has(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_6_has(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_field) {
  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("_has", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__has(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __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("capnp.lib.capnp._DynamicStructReader._has", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1046
 *         return self.thisptr.has(field)
 * 
 *     cpdef _has_by_field(self, _StructSchemaField field):             # <<<<<<<<<<<<<<
 *         return self.thisptr.hasByField(field.thisptr)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_9_has_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__has_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_has_by_field", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_by_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_9_has_by_field)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_field)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_field));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1047
 * 
 *     cpdef _has_by_field(self, _StructSchemaField field):
 *         return self.thisptr.hasByField(field.thisptr)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _which_str(self):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.has(__pyx_v_field->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1047, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1046
 *         return self.thisptr.has(field)
 * 
 *     cpdef _has_by_field(self, _StructSchemaField field):             # <<<<<<<<<<<<<<
 *         return self.thisptr.hasByField(field.thisptr)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructReader._has_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_9_has_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_8_has_by_field[] = "_DynamicStructReader._has_by_field(self, _StructSchemaField field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_9_has_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_has_by_field (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_ptype_5capnp_3lib_5capnp__StructSchemaField, 1, "field", 0))) __PYX_ERR(0, 1046, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_8_has_by_field(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_8_has_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field) {
  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("_has_by_field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__has_by_field(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __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("capnp.lib.capnp._DynamicStructReader._has_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1049
 *         return self.thisptr.hasByField(field.thisptr)
 * 
 *     cpdef _which_str(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_11_which_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__which_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
   ::capnp::StructSchema::Field __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_which_str", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_which_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_11_which_str)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1050
 * 
 *     cpdef _which_str(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "capnp/lib/capnp.pyx":1051
 *     cpdef _which_str(self):
 *         try:
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *         except:
 *             raise KjException("Attempted to call which on a non-union type")
 */
      __Pyx_XDECREF(__pyx_r);
      try {
        __pyx_t_8 = fixMaybe(__pyx_v_self->thisptr.which());
      } catch(...) {
        reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
        __PYX_ERR(0, 1051, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyStr_FromString(((char *)__pyx_t_8.getProto().getName().cStr())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":1050
 * 
 *     cpdef _which_str(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:
 */
    }
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1052
 *         try:
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:             # <<<<<<<<<<<<<<
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader._which_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 1052, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);

      /* "capnp/lib/capnp.pyx":1053
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:
 *             raise KjException("Attempted to call which on a non-union type")             # <<<<<<<<<<<<<<
 * 
 *     cpdef _DynamicEnumField _which(self):
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_KjException); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1053, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_kp_s_Attempted_to_call_which_on_a_non) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_s_Attempted_to_call_which_on_a_non);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1053, __pyx_L5_except_error)
    }
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":1050
 * 
 *     cpdef _which_str(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":1049
 *         return self.thisptr.hasByField(field.thisptr)
 * 
 *     cpdef _which_str(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 */

  /* 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_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader._which_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_11_which_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_10_which_str[] = "_DynamicStructReader._which_str(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_11_which_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_which_str (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_10_which_str(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_10_which_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__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("_which_str", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__which_str(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __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("capnp.lib.capnp._DynamicStructReader._which_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1055
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 *     cpdef _DynamicEnumField _which(self):             # <<<<<<<<<<<<<<
 *         """Returns the enum corresponding to the union in this struct
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_13_which(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__which(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_which = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__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;
  PyObject *__pyx_t_7 = NULL;
   ::capnp::StructSchema::Field __pyx_t_8;
  struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_which", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_which_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_13_which)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5capnp_3lib_5capnp__DynamicEnumField))))) __PYX_ERR(0, 1055, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1063
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "capnp/lib/capnp.pyx":1064
 *         """
 *         try:
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)             # <<<<<<<<<<<<<<
 *         except:
 *             raise KjException("Attempted to call which on a non-union type")
 */
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicEnumField)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchemaField)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      try {
        __pyx_t_8 = fixMaybe(__pyx_v_self->thisptr.which());
      } catch(...) {
        reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
        __PYX_ERR(0, 1064, __pyx_L3_error)
      }
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.parent = ((PyObject *)__pyx_v_self);
      __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchemaField *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_t_2), __pyx_t_8, &__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_proto); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnumField *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_t_1), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_which = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":1063
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1065
 *         try:
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:             # <<<<<<<<<<<<<<
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader._which", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1065, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);

      /* "capnp/lib/capnp.pyx":1066
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:
 *             raise KjException("Attempted to call which on a non-union type")             # <<<<<<<<<<<<<<
 * 
 *         return which
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_KjException); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1066, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_kp_s_Attempted_to_call_which_on_a_non) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_kp_s_Attempted_to_call_which_on_a_non);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1066, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1066, __pyx_L5_except_error)
    }
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":1063
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "capnp/lib/capnp.pyx":1068
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 *         return which             # <<<<<<<<<<<<<<
 * 
 *     property which:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(((__pyx_v_which) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_which, __pyx_ptype_5capnp_3lib_5capnp__DynamicEnumField))))) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_which);
  __pyx_r = ((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_which);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1055
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 *     cpdef _DynamicEnumField _which(self):             # <<<<<<<<<<<<<<
 *         """Returns the enum corresponding to the union in this struct
 * 
 */

  /* 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_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader._which", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_which);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_13_which(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_12_which[] = "_DynamicStructReader._which(self) -> _DynamicEnumField\nReturns the enum corresponding to the union in this struct\n\n        :rtype: :class:`_DynamicEnumField`\n        :return: A string/enum corresponding to what field is set in the union\n\n        :Raises: :exc:`KjException` if this struct doesn't contain a union\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_13_which(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_which (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_12_which(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_12_which(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__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("_which", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__which(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __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("capnp.lib.capnp._DynamicStructReader._which", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1078
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         def __get__(_DynamicStructReader self):             # <<<<<<<<<<<<<<
 *             return self._which()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_5which_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_5which_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_5which___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_5which___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":1079
 *         """
 *         def __get__(_DynamicStructReader self):
 *             return self._which()             # <<<<<<<<<<<<<<
 * 
 *     property schema:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self->__pyx_vtab)->_which(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1078
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         def __get__(_DynamicStructReader self):             # <<<<<<<<<<<<<<
 *             return self._which()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.which.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1083
 *     property schema:
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._schema is None:
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":1084
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):
 *             if self._schema is None:             # <<<<<<<<<<<<<<
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 *             return self._schema
 */
  __pyx_t_1 = (__pyx_v_self->_schema == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":1085
 *         def __get__(self):
 *             if self._schema is None:
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())             # <<<<<<<<<<<<<<
 *             return self._schema
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchema)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_3), __pyx_v_self->thisptr.getSchema()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->_schema);
    __Pyx_DECREF(__pyx_v_self->_schema);
    __pyx_v_self->_schema = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1084
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):
 *             if self._schema is None:             # <<<<<<<<<<<<<<
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 *             return self._schema
 */
  }

  /* "capnp/lib/capnp.pyx":1086
 *             if self._schema is None:
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 *             return self._schema             # <<<<<<<<<<<<<<
 * 
 *     def __dir__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_schema);
  __pyx_r = __pyx_v_self->_schema;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1083
 *     property schema:
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._schema is None:
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1088
 *             return self._schema
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_15__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_14__dir__[] = "_DynamicStructReader.__dir__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_15__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dir__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_14__dir__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_14__dir__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dir__", 0);

  /* "capnp/lib/capnp.pyx":1089
 * 
 *     def __dir__(self):
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fieldnames); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1088
 *             return self._schema
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.__dir__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1091
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>printStructReader(self.thisptr).flatten().cStr()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_17__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_17__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_16__str__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_16__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
   ::kj::StringTree __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "capnp/lib/capnp.pyx":1092
 * 
 *     def __str__(self):
 *         return <char*>printStructReader(self.thisptr).flatten().cStr()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 =  ::capnp::prettyPrint(__pyx_v_self->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1092, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyStr_FromString(((char *)__pyx_t_1.flatten().cStr())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1091
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>printStructReader(self.thisptr).flatten().cStr()
 * 
 */

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

/* "capnp/lib/capnp.pyx":1094
 *         return <char*>printStructReader(self.thisptr).flatten().cStr()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s reader %s>' % (self.schema.node.displayName, <char*>strStructReader(self.thisptr).cStr())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_19__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_19__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_18__repr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_18__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "capnp/lib/capnp.pyx":1095
 * 
 *     def __repr__(self):
 *         return '<%s reader %s>' % (self.schema.node.displayName, <char*>strStructReader(self.thisptr).cStr())             # <<<<<<<<<<<<<<
 * 
 *     def to_dict(self, verbose=False, ordered=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_displayName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyStr_FromString(((char *) ::kj::str(__pyx_v_self->thisptr).cStr())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_reader_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __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;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1094
 *         return <char*>printStructReader(self.thisptr).flatten().cStr()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s reader %s>' % (self.schema.node.displayName, <char*>strStructReader(self.thisptr).cStr())
 * 
 */

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

/* "capnp/lib/capnp.pyx":1097
 *         return '<%s reader %s>' % (self.schema.node.displayName, <char*>strStructReader(self.thisptr).cStr())
 * 
 *     def to_dict(self, verbose=False, ordered=False):             # <<<<<<<<<<<<<<
 *         return _to_dict(self, verbose, ordered)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_21to_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_20to_dict[] = "_DynamicStructReader.to_dict(self, verbose=False, ordered=False)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_21to_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_ordered = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_verbose,&__pyx_n_s_ordered,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_False);
    values[1] = ((PyObject *)Py_False);
    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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ordered);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_dict") < 0)) __PYX_ERR(0, 1097, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_verbose = values[0];
    __pyx_v_ordered = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_dict", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1097, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_20to_dict(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), __pyx_v_verbose, __pyx_v_ordered);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_20to_dict(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_ordered) {
  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("to_dict", 0);

  /* "capnp/lib/capnp.pyx":1098
 * 
 *     def to_dict(self, verbose=False, ordered=False):
 *         return _to_dict(self, verbose, ordered)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_builder(self, num_first_segment_words=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ordered); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1098, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp__to_dict(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1097
 *         return '<%s reader %s>' % (self.schema.node.displayName, <char*>strStructReader(self.thisptr).cStr())
 * 
 *     def to_dict(self, verbose=False, ordered=False):             # <<<<<<<<<<<<<<
 *         return _to_dict(self, verbose, ordered)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1100
 *         return _to_dict(self, verbose, ordered)
 * 
 *     cpdef as_builder(self, num_first_segment_words=None):             # <<<<<<<<<<<<<<
 *         """A method for casting this Reader to a Builder
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_23as_builder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder *__pyx_optional_args) {
  PyObject *__pyx_v_num_first_segment_words = ((PyObject *)Py_None);
  struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *__pyx_v_builder = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_builder", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_num_first_segment_words = __pyx_optional_args->num_first_segment_words;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_builder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_23as_builder)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_num_first_segment_words) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_num_first_segment_words);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1110
 *         :rtype: :class:`_DynamicStructBuilder`
 *         """
 *         builder = _MallocMessageBuilder(num_first_segment_words)             # <<<<<<<<<<<<<<
 *         return builder.set_root(self)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MallocMessageBuilder), __pyx_v_num_first_segment_words); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_builder = ((struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1111
 *         """
 *         builder = _MallocMessageBuilder(num_first_segment_words)
 *         return builder.set_root(self)             # <<<<<<<<<<<<<<
 * 
 *     property total_size:
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__MallocMessageBuilder *)__pyx_v_builder->__pyx_base.__pyx_vtab)->__pyx_base.set_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_builder), ((PyObject *)__pyx_v_self), 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1111, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1100
 *         return _to_dict(self, verbose, ordered)
 * 
 *     cpdef as_builder(self, num_first_segment_words=None):             # <<<<<<<<<<<<<<
 *         """A method for casting this Reader to a Builder
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructReader.as_builder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_builder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_23as_builder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_22as_builder[] = "_DynamicStructReader.as_builder(self, num_first_segment_words=None)\nA method for casting this Reader to a Builder\n\n        This is a copying operation with respect to the message's buffer. Changes in the new builder will not reflect in the original reader.\n\n        :type num_first_segment_words: int\n        :param num_first_segment_words: Size of the first segment to allocate in the message (in words ie. 8 byte increments)\n\n        :rtype: :class:`_DynamicStructBuilder`\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_23as_builder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_num_first_segment_words = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_builder (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_num_first_segment_words,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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num_first_segment_words);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "as_builder") < 0)) __PYX_ERR(0, 1100, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_num_first_segment_words = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("as_builder", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1100, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.as_builder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_22as_builder(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), __pyx_v_num_first_segment_words);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_22as_builder(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_num_first_segment_words) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_builder", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.num_first_segment_words = __pyx_v_num_first_segment_words;
  __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructReader->as_builder(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __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("capnp.lib.capnp._DynamicStructReader.as_builder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1114
 * 
 *     property total_size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             size = self.thisptr.totalSize()
 *             return _MessageSize(size.wordCount, size.capCount)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_10total_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_10total_size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_10total_size___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_10total_size___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self) {
   ::capnp::MessageSize __pyx_v_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":1115
 *     property total_size:
 *         def __get__(self):
 *             size = self.thisptr.totalSize()             # <<<<<<<<<<<<<<
 *             return _MessageSize(size.wordCount, size.capCount)
 * 
 */
  __pyx_v_size = __pyx_v_self->thisptr.totalSize();

  /* "capnp/lib/capnp.pyx":1116
 *         def __get__(self):
 *             size = self.thisptr.totalSize()
 *             return _MessageSize(size.wordCount, size.capCount)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce_ex__(self, proto):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_size.wordCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size.capCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MessageSize), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __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;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1114
 * 
 *     property total_size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             size = self.thisptr.totalSize()
 *             return _MessageSize(size.wordCount, size.capCount)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.total_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1118
 *             return _MessageSize(size.wordCount, size.capCount)
 * 
 *     def __reduce_ex__(self, proto):             # <<<<<<<<<<<<<<
 *         return _struct_reducer, (self.schema.node.id, self.as_builder().to_bytes())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_25__reduce_ex__(PyObject *__pyx_v_self, PyObject *__pyx_v_proto); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_24__reduce_ex__[] = "_DynamicStructReader.__reduce_ex__(self, proto)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_25__reduce_ex__(PyObject *__pyx_v_self, PyObject *__pyx_v_proto) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_ex__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_24__reduce_ex__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), ((PyObject *)__pyx_v_proto));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_24__reduce_ex__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_proto) {
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_ex__", 0);

  /* "capnp/lib/capnp.pyx":1119
 * 
 *     def __reduce_ex__(self, proto):
 *         return _struct_reducer, (self.schema.node.id, self.as_builder().to_bytes())             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_struct_reducer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self->__pyx_vtab)->as_builder(__pyx_v_self, 0, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_to_bytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1118
 *             return _MessageSize(size.wordCount, size.capCount)
 * 
 *     def __reduce_ex__(self, proto):             # <<<<<<<<<<<<<<
 *         return _struct_reducer, (self.schema.node.id, self.as_builder().to_bytes())
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.__reduce_ex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pxd":42
 * cdef class _DynamicStructReader:
 *     cdef C_DynamicStruct.Reader thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 *     cdef public bint is_root
 *     cdef object _obj_to_pin
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "capnp/lib/capnp.pxd":43
 *     cdef C_DynamicStruct.Reader thisptr
 *     cdef public object _parent
 *     cdef public bint is_root             # <<<<<<<<<<<<<<
 *     cdef object _obj_to_pin
 *     cdef object _schema
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 43, __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("capnp.lib.capnp._DynamicStructReader.is_root.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 43, __pyx_L1_error)
  __pyx_v_self->is_root = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructReader.is_root.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1135
 *         print getattr(person, 'field-with-hyphens') # for names that are invalid for python, use getattr
 *     """
 *     cdef _init(self, DynamicStruct_Builder other, object parent, bint isRoot = False, bint tryRegistry = True):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self,  ::capnp::DynamicStruct::Builder __pyx_v_other, PyObject *__pyx_v_parent, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init *__pyx_optional_args) {
  int __pyx_v_isRoot = ((int)0);
  int __pyx_v_tryRegistry = ((int)1);
  PyObject *__pyx_v_registered_type = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_isRoot = __pyx_optional_args->isRoot;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_tryRegistry = __pyx_optional_args->tryRegistry;
      }
    }
  }

  /* "capnp/lib/capnp.pyx":1136
 *     """
 *     cdef _init(self, DynamicStruct_Builder other, object parent, bint isRoot = False, bint tryRegistry = True):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         self.is_root = isRoot
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":1137
 *     cdef _init(self, DynamicStruct_Builder other, object parent, bint isRoot = False, bint tryRegistry = True):
 *         self.thisptr = other
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         self.is_root = isRoot
 *         self._is_written = False
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":1138
 *         self.thisptr = other
 *         self._parent = parent
 *         self.is_root = isRoot             # <<<<<<<<<<<<<<
 *         self._is_written = False
 *         self._schema = None
 */
  __pyx_v_self->is_root = __pyx_v_isRoot;

  /* "capnp/lib/capnp.pyx":1139
 *         self._parent = parent
 *         self.is_root = isRoot
 *         self._is_written = False             # <<<<<<<<<<<<<<
 *         self._schema = None
 * 
 */
  __pyx_v_self->_is_written = 0;

  /* "capnp/lib/capnp.pyx":1140
 *         self.is_root = isRoot
 *         self._is_written = False
 *         self._schema = None             # <<<<<<<<<<<<<<
 * 
 *         if tryRegistry and len(_type_registry) > 0:
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_schema);
  __Pyx_DECREF(__pyx_v_self->_schema);
  __pyx_v_self->_schema = Py_None;

  /* "capnp/lib/capnp.pyx":1142
 *         self._schema = None
 * 
 *         if tryRegistry and len(_type_registry) > 0:             # <<<<<<<<<<<<<<
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:
 */
  __pyx_t_2 = (__pyx_v_tryRegistry != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __pyx_v_5capnp_3lib_5capnp__type_registry;
  __Pyx_INCREF(__pyx_t_3);
  if (unlikely(__pyx_t_3 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1142, __pyx_L1_error)
  }
  __pyx_t_4 = PyDict_Size(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((__pyx_t_4 > 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":1143
 * 
 *         if tryRegistry and len(_type_registry) > 0:
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)             # <<<<<<<<<<<<<<
 *             if registered_type:
 *                 return registered_type[1](self)
 */
    if (unlikely(__pyx_v_5capnp_3lib_5capnp__type_registry == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 1143, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->thisptr.getSchema().getProto().getId()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_5capnp_3lib_5capnp__type_registry, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_registered_type = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":1144
 *         if tryRegistry and len(_type_registry) > 0:
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:             # <<<<<<<<<<<<<<
 *                 return registered_type[1](self)
 *         return self
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_registered_type); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1144, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "capnp/lib/capnp.pyx":1145
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:
 *                 return registered_type[1](self)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_registered_type, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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);
        }
      }
      __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;

      /* "capnp/lib/capnp.pyx":1144
 *         if tryRegistry and len(_type_registry) > 0:
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:             # <<<<<<<<<<<<<<
 *                 return registered_type[1](self)
 *         return self
 */
    }

    /* "capnp/lib/capnp.pyx":1142
 *         self._schema = None
 * 
 *         if tryRegistry and len(_type_registry) > 0:             # <<<<<<<<<<<<<<
 *             registered_type = _type_registry.get(self.thisptr.getId(), None)
 *             if registered_type:
 */
  }

  /* "capnp/lib/capnp.pyx":1146
 *             if registered_type:
 *                 return registered_type[1](self)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef _check_write(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1135
 *         print getattr(person, 'field-with-hyphens') # for names that are invalid for python, use getattr
 *     """
 *     cdef _init(self, DynamicStruct_Builder other, object parent, bint isRoot = False, bint tryRegistry = True):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_registered_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1148
 *         return self
 * 
 *     cdef _check_write(self):             # <<<<<<<<<<<<<<
 *         if not self.is_root:
 *             raise KjException("You can only call write() on the message's root struct.")
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__check_write(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_write", 0);

  /* "capnp/lib/capnp.pyx":1149
 * 
 *     cdef _check_write(self):
 *         if not self.is_root:             # <<<<<<<<<<<<<<
 *             raise KjException("You can only call write() on the message's root struct.")
 *         if self._is_written:
 */
  __pyx_t_1 = ((!(__pyx_v_self->is_root != 0)) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":1150
 *     cdef _check_write(self):
 *         if not self.is_root:
 *             raise KjException("You can only call write() on the message's root struct.")             # <<<<<<<<<<<<<<
 *         if self._is_written:
 *             _warnings.warn("This message has already been written once. Be very careful that you're not setting Text/Struct/List fields more than once, since that will cause memory leaks (both in memory and in the serialized data). You can disable this warning by calling the `clear_write_flag` method of this object after every write.")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_You_can_only_call_write_on_the_m) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_You_can_only_call_write_on_the_m);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1150, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1149
 * 
 *     cdef _check_write(self):
 *         if not self.is_root:             # <<<<<<<<<<<<<<
 *             raise KjException("You can only call write() on the message's root struct.")
 *         if self._is_written:
 */
  }

  /* "capnp/lib/capnp.pyx":1151
 *         if not self.is_root:
 *             raise KjException("You can only call write() on the message's root struct.")
 *         if self._is_written:             # <<<<<<<<<<<<<<
 *             _warnings.warn("This message has already been written once. Be very careful that you're not setting Text/Struct/List fields more than once, since that will cause memory leaks (both in memory and in the serialized data). You can disable this warning by calling the `clear_write_flag` method of this object after every write.")
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_is_written != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":1152
 *             raise KjException("You can only call write() on the message's root struct.")
 *         if self._is_written:
 *             _warnings.warn("This message has already been written once. Be very careful that you're not setting Text/Struct/List fields more than once, since that will cause memory leaks (both in memory and in the serialized data). You can disable this warning by calling the `clear_write_flag` method of this object after every write.")             # <<<<<<<<<<<<<<
 * 
 *     def write(self, file):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_warnings); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_s_This_message_has_already_been_wr) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_This_message_has_already_been_wr);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":1151
 *         if not self.is_root:
 *             raise KjException("You can only call write() on the message's root struct.")
 *         if self._is_written:             # <<<<<<<<<<<<<<
 *             _warnings.warn("This message has already been written once. Be very careful that you're not setting Text/Struct/List fields more than once, since that will cause memory leaks (both in memory and in the serialized data). You can disable this warning by calling the `clear_write_flag` method of this object after every write.")
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1148
 *         return self
 * 
 *     cdef _check_write(self):             # <<<<<<<<<<<<<<
 *         if not self.is_root:
 *             raise KjException("You can only call write() on the message's root struct.")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._check_write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1154
 *             _warnings.warn("This message has already been written once. Be very careful that you're not setting Text/Struct/List fields more than once, since that will cause memory leaks (both in memory and in the serialized data). You can disable this warning by calling the `clear_write_flag` method of this object after every write.")
 * 
 *     def write(self, file):             # <<<<<<<<<<<<<<
 *         """Writes the struct's containing message to the given file object in unpacked binary format.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_1write(PyObject *__pyx_v_self, PyObject *__pyx_v_file); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_write[] = "_DynamicStructBuilder.write(self, file)\nWrites the struct's containing message to the given file object in unpacked binary format.\n\n        This is a shortcut for calling capnp._write_message_to_fd().  This can only be called on the\n        message's root struct.\n\n        :type file: file\n        :param file: A file or socket object (or anything with a fileno() method), open for write.\n\n        :rtype: void\n\n        :Raises: :exc:`KjException` if this isn't the message's root struct.\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_1write(PyObject *__pyx_v_self, PyObject *__pyx_v_file) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_write(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_file));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_write(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_file) {
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("write", 0);

  /* "capnp/lib/capnp.pyx":1167
 *         :Raises: :exc:`KjException` if this isn't the message's root struct.
 *         """
 *         self._check_write()             # <<<<<<<<<<<<<<
 *         _write_message_to_fd(file.fileno(), self._parent)
 *         self._is_written = True
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_check_write(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1168
 *         """
 *         self._check_write()
 *         _write_message_to_fd(file.fileno(), self._parent)             # <<<<<<<<<<<<<<
 *         self._is_written = True
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_write_message_to_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(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);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_self->_parent};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_self->_parent};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_self->_parent);
    __Pyx_GIVEREF(__pyx_v_self->_parent);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_self->_parent);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1169
 *         self._check_write()
 *         _write_message_to_fd(file.fileno(), self._parent)
 *         self._is_written = True             # <<<<<<<<<<<<<<
 * 
 *     def write_packed(self, file):
 */
  __pyx_v_self->_is_written = 1;

  /* "capnp/lib/capnp.pyx":1154
 *             _warnings.warn("This message has already been written once. Be very careful that you're not setting Text/Struct/List fields more than once, since that will cause memory leaks (both in memory and in the serialized data). You can disable this warning by calling the `clear_write_flag` method of this object after every write.")
 * 
 *     def write(self, file):             # <<<<<<<<<<<<<<
 *         """Writes the struct's containing message to the given file object in unpacked binary format.
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1171
 *         self._is_written = True
 * 
 *     def write_packed(self, file):             # <<<<<<<<<<<<<<
 *         """Writes the struct's containing message to the given file object in packed binary format.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_3write_packed(PyObject *__pyx_v_self, PyObject *__pyx_v_file); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_2write_packed[] = "_DynamicStructBuilder.write_packed(self, file)\nWrites the struct's containing message to the given file object in packed binary format.\n\n        This is a shortcut for calling capnp._write_packed_message_to_fd().  This can only be called on\n        the message's root struct.\n\n        :type file: file\n        :param file: A file or socket object (or anything with a fileno() method), open for write.\n\n        :rtype: void\n\n        :Raises: :exc:`KjException` if this isn't the message's root struct.\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_3write_packed(PyObject *__pyx_v_self, PyObject *__pyx_v_file) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write_packed (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_2write_packed(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_file));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_2write_packed(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_file) {
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("write_packed", 0);

  /* "capnp/lib/capnp.pyx":1184
 *         :Raises: :exc:`KjException` if this isn't the message's root struct.
 *         """
 *         self._check_write()             # <<<<<<<<<<<<<<
 *         _write_packed_message_to_fd(file.fileno(), self._parent)
 *         self._is_written = True
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_check_write(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1185
 *         """
 *         self._check_write()
 *         _write_packed_message_to_fd(file.fileno(), self._parent)             # <<<<<<<<<<<<<<
 *         self._is_written = True
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_write_packed_message_to_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(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);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_self->_parent};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_self->_parent};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_self->_parent);
    __Pyx_GIVEREF(__pyx_v_self->_parent);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_self->_parent);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1186
 *         self._check_write()
 *         _write_packed_message_to_fd(file.fileno(), self._parent)
 *         self._is_written = True             # <<<<<<<<<<<<<<
 * 
 *     cpdef to_bytes(_DynamicStructBuilder self) except +reraise_kj_exception:
 */
  __pyx_v_self->_is_written = 1;

  /* "capnp/lib/capnp.pyx":1171
 *         self._is_written = True
 * 
 *     def write_packed(self, file):             # <<<<<<<<<<<<<<
 *         """Writes the struct's containing message to the given file object in packed binary format.
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.write_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1188
 *         self._is_written = True
 * 
 *     cpdef to_bytes(_DynamicStructBuilder self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """Returns the struct's containing message as a Python bytes object in the unpacked binary format.
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_5to_bytes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_bytes(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_builder = 0;
   ::kj::Array< ::capnp::word> __pyx_v_array;
  char const *__pyx_v_ptr;
  PyObject *__pyx_v_ret = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_bytes", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_5to_bytes)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1197
 *         :Raises: :exc:`KjException` if this isn't the message's root struct.
 *         """
 *         self._check_write()             # <<<<<<<<<<<<<<
 *         cdef _MessageBuilder builder = self._parent
 *         array = schema_cpp.messageToFlatArray(deref(builder.thisptr))
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_check_write(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1198
 *         """
 *         self._check_write()
 *         cdef _MessageBuilder builder = self._parent             # <<<<<<<<<<<<<<
 *         array = schema_cpp.messageToFlatArray(deref(builder.thisptr))
 *         cdef const char* ptr = <const char *>array.begin()
 */
  if (!(likely(((__pyx_v_self->_parent) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_parent, __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder))))) __PYX_ERR(0, 1198, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_builder = ((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1199
 *         self._check_write()
 *         cdef _MessageBuilder builder = self._parent
 *         array = schema_cpp.messageToFlatArray(deref(builder.thisptr))             # <<<<<<<<<<<<<<
 *         cdef const char* ptr = <const char *>array.begin()
 *         cdef bytes ret = ptr[:8*array.size()]
 */
  __pyx_v_array =  ::capnp::messageToFlatArray((*__pyx_v_builder->thisptr));

  /* "capnp/lib/capnp.pyx":1200
 *         cdef _MessageBuilder builder = self._parent
 *         array = schema_cpp.messageToFlatArray(deref(builder.thisptr))
 *         cdef const char* ptr = <const char *>array.begin()             # <<<<<<<<<<<<<<
 *         cdef bytes ret = ptr[:8*array.size()]
 *         self._is_written = True
 */
  __pyx_v_ptr = ((char const *)__pyx_v_array.begin());

  /* "capnp/lib/capnp.pyx":1201
 *         array = schema_cpp.messageToFlatArray(deref(builder.thisptr))
 *         cdef const char* ptr = <const char *>array.begin()
 *         cdef bytes ret = ptr[:8*array.size()]             # <<<<<<<<<<<<<<
 *         self._is_written = True
 *         return ret
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_ptr + 0, (8 * __pyx_v_array.size()) - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ret = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1202
 *         cdef const char* ptr = <const char *>array.begin()
 *         cdef bytes ret = ptr[:8*array.size()]
 *         self._is_written = True             # <<<<<<<<<<<<<<
 *         return ret
 * 
 */
  __pyx_v_self->_is_written = 1;

  /* "capnp/lib/capnp.pyx":1203
 *         cdef bytes ret = ptr[:8*array.size()]
 *         self._is_written = True
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     cpdef to_segments(_DynamicStructBuilder self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1188
 *         self._is_written = True
 * 
 *     cpdef to_bytes(_DynamicStructBuilder self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """Returns the struct's containing message as a Python bytes object in the unpacked binary format.
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.to_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_builder);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_5to_bytes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_4to_bytes[] = "_DynamicStructBuilder.to_bytes(self)\nReturns the struct's containing message as a Python bytes object in the unpacked binary format.\n\n        This is inefficient; it makes several copies.\n\n        :rtype: bytes\n\n        :Raises: :exc:`KjException` if this isn't the message's root struct.\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_5to_bytes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_bytes (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_4to_bytes(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_4to_bytes(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__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("to_bytes", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_bytes(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1188, __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("capnp.lib.capnp._DynamicStructBuilder.to_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1205
 *         return ret
 * 
 *     cpdef to_segments(_DynamicStructBuilder self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """Returns the struct's containing message as a Python list of Python bytes objects.
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7to_segments(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_segments(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_builder = 0;
  PyObject *__pyx_v_segments = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_segments", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_segments); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7to_segments)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1205, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1214
 *         :rtype: list
 *         """
 *         self._check_write()             # <<<<<<<<<<<<<<
 *         cdef _MessageBuilder builder = self._parent
 *         segments = builder.get_segments_for_output()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_check_write(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1215
 *         """
 *         self._check_write()
 *         cdef _MessageBuilder builder = self._parent             # <<<<<<<<<<<<<<
 *         segments = builder.get_segments_for_output()
 *         return segments
 */
  if (!(likely(((__pyx_v_self->_parent) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_parent, __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder))))) __PYX_ERR(0, 1215, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_builder = ((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1216
 *         self._check_write()
 *         cdef _MessageBuilder builder = self._parent
 *         segments = builder.get_segments_for_output()             # <<<<<<<<<<<<<<
 *         return segments
 * 
 */
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_builder->__pyx_vtab)->get_segments_for_output(__pyx_v_builder, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1216, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_segments = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1217
 *         cdef _MessageBuilder builder = self._parent
 *         segments = builder.get_segments_for_output()
 *         return segments             # <<<<<<<<<<<<<<
 * 
 *     cpdef _to_bytes_packed_helper(_DynamicStructBuilder self, word_count) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_segments);
  __pyx_r = __pyx_v_segments;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1205
 *         return ret
 * 
 *     cpdef to_segments(_DynamicStructBuilder self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """Returns the struct's containing message as a Python list of Python bytes objects.
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.to_segments", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_builder);
  __Pyx_XDECREF(__pyx_v_segments);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7to_segments(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_6to_segments[] = "_DynamicStructBuilder.to_segments(self)\nReturns the struct's containing message as a Python list of Python bytes objects.\n\n        This avoids making copies.\n\n        NB: This is not currently supported on PyPy.\n\n        :rtype: list\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7to_segments(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_segments (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_6to_segments(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_6to_segments(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__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("to_segments", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_segments(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1205, __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("capnp.lib.capnp._DynamicStructBuilder.to_segments", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1219
 *         return segments
 * 
 *     cpdef _to_bytes_packed_helper(_DynamicStructBuilder self, word_count) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _MessageBuilder builder = self._parent
 *         array = helpers.messageToPackedBytes(deref(builder.thisptr), word_count)
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_9_to_bytes_packed_helper(PyObject *__pyx_v_self, PyObject *__pyx_v_word_count); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__to_bytes_packed_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_word_count, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_builder = 0;
   ::kj::Array< ::capnp::byte> __pyx_v_array;
  char const *__pyx_v_ptr;
  PyObject *__pyx_v_ret = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_bytes_packed_helper", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_bytes_packed_helper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_9_to_bytes_packed_helper)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_word_count) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_word_count);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1219, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1220
 * 
 *     cpdef _to_bytes_packed_helper(_DynamicStructBuilder self, word_count) except +reraise_kj_exception:
 *         cdef _MessageBuilder builder = self._parent             # <<<<<<<<<<<<<<
 *         array = helpers.messageToPackedBytes(deref(builder.thisptr), word_count)
 *         cdef const char* ptr = <const char *>array.begin()
 */
  if (!(likely(((__pyx_v_self->_parent) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_parent, __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder))))) __PYX_ERR(0, 1220, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_builder = ((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1221
 *     cpdef _to_bytes_packed_helper(_DynamicStructBuilder self, word_count) except +reraise_kj_exception:
 *         cdef _MessageBuilder builder = self._parent
 *         array = helpers.messageToPackedBytes(deref(builder.thisptr), word_count)             # <<<<<<<<<<<<<<
 *         cdef const char* ptr = <const char *>array.begin()
 *         cdef bytes ret = ptr[:array.size()]
 */
  __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_word_count); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1221, __pyx_L1_error)
  __pyx_v_array = messageToPackedBytes((*__pyx_v_builder->thisptr), __pyx_t_5);

  /* "capnp/lib/capnp.pyx":1222
 *         cdef _MessageBuilder builder = self._parent
 *         array = helpers.messageToPackedBytes(deref(builder.thisptr), word_count)
 *         cdef const char* ptr = <const char *>array.begin()             # <<<<<<<<<<<<<<
 *         cdef bytes ret = ptr[:array.size()]
 *         return ret
 */
  __pyx_v_ptr = ((char const *)__pyx_v_array.begin());

  /* "capnp/lib/capnp.pyx":1223
 *         array = helpers.messageToPackedBytes(deref(builder.thisptr), word_count)
 *         cdef const char* ptr = <const char *>array.begin()
 *         cdef bytes ret = ptr[:array.size()]             # <<<<<<<<<<<<<<
 *         return ret
 * 
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_ptr + 0, __pyx_v_array.size() - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ret = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1224
 *         cdef const char* ptr = <const char *>array.begin()
 *         cdef bytes ret = ptr[:array.size()]
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     cpdef to_bytes_packed(_DynamicStructBuilder self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1219
 *         return segments
 * 
 *     cpdef _to_bytes_packed_helper(_DynamicStructBuilder self, word_count) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _MessageBuilder builder = self._parent
 *         array = helpers.messageToPackedBytes(deref(builder.thisptr), word_count)
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder._to_bytes_packed_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_builder);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_9_to_bytes_packed_helper(PyObject *__pyx_v_self, PyObject *__pyx_v_word_count); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_8_to_bytes_packed_helper[] = "_DynamicStructBuilder._to_bytes_packed_helper(self, word_count)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_9_to_bytes_packed_helper(PyObject *__pyx_v_self, PyObject *__pyx_v_word_count) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_to_bytes_packed_helper (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_8_to_bytes_packed_helper(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_word_count));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_8_to_bytes_packed_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_word_count) {
  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("_to_bytes_packed_helper", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__to_bytes_packed_helper(__pyx_v_self, __pyx_v_word_count, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1219, __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("capnp.lib.capnp._DynamicStructBuilder._to_bytes_packed_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1226
 *         return ret
 * 
 *     cpdef to_bytes_packed(_DynamicStructBuilder self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         self._check_write()
 *         word_count = self.total_size.word_count + 2
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11to_bytes_packed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_bytes_packed(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_word_count = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_7 = NULL;
  int __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("to_bytes_packed", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_bytes_packed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11to_bytes_packed)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1226, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1227
 * 
 *     cpdef to_bytes_packed(_DynamicStructBuilder self) except +reraise_kj_exception:
 *         self._check_write()             # <<<<<<<<<<<<<<
 *         word_count = self.total_size.word_count + 2
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_check_write(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1228
 *     cpdef to_bytes_packed(_DynamicStructBuilder self) except +reraise_kj_exception:
 *         self._check_write()
 *         word_count = self.total_size.word_count + 2             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_total_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_word_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_word_count = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1230
 *         word_count = self.total_size.word_count + 2
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             ret = self._to_bytes_packed_helper(word_count)
 *         except Exception as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "capnp/lib/capnp.pyx":1231
 * 
 *         try:
 *             ret = self._to_bytes_packed_helper(word_count)             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             if 'backing array was not large enough' in str(e):
 */
      try {
        __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_to_bytes_packed_helper(__pyx_v_self, __pyx_v_word_count, 0);
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L3_error)
      } catch(...) {
        reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
        __PYX_ERR(0, 1231, __pyx_L3_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_ret = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "capnp/lib/capnp.pyx":1230
 *         word_count = self.total_size.word_count + 2
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             ret = self._to_bytes_packed_helper(word_count)
 *         except Exception as e:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1232
 *         try:
 *             ret = self._to_bytes_packed_helper(word_count)
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             if 'backing array was not large enough' in str(e):
 *                 word_count *= 2
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_8) {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.to_bytes_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 1232, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;

      /* "capnp/lib/capnp.pyx":1233
 *             ret = self._to_bytes_packed_helper(word_count)
 *         except Exception as e:
 *             if 'backing array was not large enough' in str(e):             # <<<<<<<<<<<<<<
 *                 word_count *= 2
 *                 ret = self._to_bytes_packed_helper(word_count)
 */
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1233, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_backing_array_was_not_large_enou, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1233, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = (__pyx_t_9 != 0);
      if (likely(__pyx_t_10)) {

        /* "capnp/lib/capnp.pyx":1234
 *         except Exception as e:
 *             if 'backing array was not large enough' in str(e):
 *                 word_count *= 2             # <<<<<<<<<<<<<<
 *                 ret = self._to_bytes_packed_helper(word_count)
 *             else:
 */
        __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_word_count, __pyx_int_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1234, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF_SET(__pyx_v_word_count, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "capnp/lib/capnp.pyx":1235
 *             if 'backing array was not large enough' in str(e):
 *                 word_count *= 2
 *                 ret = self._to_bytes_packed_helper(word_count)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise
 */
        try {
          __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_to_bytes_packed_helper(__pyx_v_self, __pyx_v_word_count, 0);
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1235, __pyx_L5_except_error)
        } catch(...) {
          reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
          __PYX_ERR(0, 1235, __pyx_L5_except_error)
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_ret, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "capnp/lib/capnp.pyx":1233
 *             ret = self._to_bytes_packed_helper(word_count)
 *         except Exception as e:
 *             if 'backing array was not large enough' in str(e):             # <<<<<<<<<<<<<<
 *                 word_count *= 2
 *                 ret = self._to_bytes_packed_helper(word_count)
 */
        goto __pyx_L11;
      }

      /* "capnp/lib/capnp.pyx":1237
 *                 ret = self._to_bytes_packed_helper(word_count)
 *             else:
 *                 raise             # <<<<<<<<<<<<<<
 * 
 *         self._is_written = True
 */
      /*else*/ {
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
        __PYX_ERR(0, 1237, __pyx_L5_except_error)
      }
      __pyx_L11:;
      __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_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":1230
 *         word_count = self.total_size.word_count + 2
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             ret = self._to_bytes_packed_helper(word_count)
 *         except Exception as e:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    __pyx_L8_try_end:;
  }

  /* "capnp/lib/capnp.pyx":1239
 *                 raise
 * 
 *         self._is_written = True             # <<<<<<<<<<<<<<
 *         return ret
 * 
 */
  __pyx_v_self->_is_written = 1;

  /* "capnp/lib/capnp.pyx":1240
 * 
 *         self._is_written = True
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get(self, field):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1226
 *         return ret
 * 
 *     cpdef to_bytes_packed(_DynamicStructBuilder self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         self._check_write()
 *         word_count = self.total_size.word_count + 2
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.to_bytes_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_word_count);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11to_bytes_packed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_10to_bytes_packed[] = "_DynamicStructBuilder.to_bytes_packed(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11to_bytes_packed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_bytes_packed (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_10to_bytes_packed(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_10to_bytes_packed(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__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("to_bytes_packed", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_bytes_packed(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1226, __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("capnp.lib.capnp._DynamicStructBuilder.to_bytes_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1242
 *         return ret
 * 
 *     cpdef _get(self, field):             # <<<<<<<<<<<<<<
 *         return to_python_builder(self.thisptr.get(field), self._parent)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_13_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
   ::capnp::DynamicValue::Builder __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_13_get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1243
 * 
 *     cpdef _get(self, field):
 *         return to_python_builder(self.thisptr.get(field), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get_by_field(self, _StructSchemaField field):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1243, __pyx_L1_error)
  try {
    __pyx_t_6 = __pyx_v_self->thisptr.get(__pyx_t_5);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1243, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_6), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __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;

  /* "capnp/lib/capnp.pyx":1242
 *         return ret
 * 
 *     cpdef _get(self, field):             # <<<<<<<<<<<<<<
 *         return to_python_builder(self.thisptr.get(field), self._parent)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_13_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_12_get[] = "_DynamicStructBuilder._get(self, field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_13_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_12_get(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_12_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__get(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __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("capnp.lib.capnp._DynamicStructBuilder._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1245
 *         return to_python_builder(self.thisptr.get(field), self._parent)
 * 
 *     cpdef _get_by_field(self, _StructSchemaField field):             # <<<<<<<<<<<<<<
 *         return to_python_builder(self.thisptr.getByField(field.thisptr), self._parent)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_15_get_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__get_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::DynamicValue::Builder __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_by_field", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_by_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_15_get_by_field)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_field)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_field));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1246
 * 
 *     cpdef _get_by_field(self, _StructSchemaField field):
 *         return to_python_builder(self.thisptr.getByField(field.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, field):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.get(__pyx_v_field->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1246, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_5), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1246, __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;

  /* "capnp/lib/capnp.pyx":1245
 *         return to_python_builder(self.thisptr.get(field), self._parent)
 * 
 *     cpdef _get_by_field(self, _StructSchemaField field):             # <<<<<<<<<<<<<<
 *         return to_python_builder(self.thisptr.getByField(field.thisptr), self._parent)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder._get_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_15_get_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_14_get_by_field[] = "_DynamicStructBuilder._get_by_field(self, _StructSchemaField field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_15_get_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_by_field (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_ptype_5capnp_3lib_5capnp__StructSchemaField, 1, "field", 0))) __PYX_ERR(0, 1245, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_14_get_by_field(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_14_get_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_by_field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__get_by_field(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __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("capnp.lib.capnp._DynamicStructBuilder._get_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1248
 *         return to_python_builder(self.thisptr.getByField(field.thisptr), self._parent)
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return self._get(field)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_17__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_17__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_16__getattr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_16__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "capnp/lib/capnp.pyx":1249
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":1250
 *     def __getattr__(self, field):
 *         try:
 *             return self._get(field)             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_field, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":1249
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1251
 *         try:
 *             return self._get(field)
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 */
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_KjException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1251, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 1251, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;

      /* "capnp/lib/capnp.pyx":1252
 *             return self._get(field)
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]             # <<<<<<<<<<<<<<
 * 
 *     cpdef _set(self, field, value):
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_to_python); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1252, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1252, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1252, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1252, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1252, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1252, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_7, Py_None, __pyx_t_11, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(0, 1252, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":1249
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":1248
 *         return to_python_builder(self.thisptr.getByField(field.thisptr), self._parent)
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return self._get(field)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1254
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 *     cpdef _set(self, field, value):             # <<<<<<<<<<<<<<
 *         _setDynamicField(self.thisptr, field, value, self._parent)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_19_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_19_set)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_field, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_field, __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1254, __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(__pyx_v_field);
          __Pyx_GIVEREF(__pyx_v_field);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_field);
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1255
 * 
 *     cpdef _set(self, field, value):
 *         _setDynamicField(self.thisptr, field, value, self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _set_by_field(self, _StructSchemaField field, value):
 */
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setDynamicField(__pyx_v_self->thisptr, __pyx_v_field, __pyx_v_value, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __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;

  /* "capnp/lib/capnp.pyx":1254
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 *     cpdef _set(self, field, value):             # <<<<<<<<<<<<<<
 *         _setDynamicField(self.thisptr, field, value, self._parent)
 * 
 */

  /* 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_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_19_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_18_set[] = "_DynamicStructBuilder._set(self, field, value)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_19_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_field = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_set (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field,&__pyx_n_s_value,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_set", 1, 2, 2, 1); __PYX_ERR(0, 1254, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set") < 0)) __PYX_ERR(0, 1254, __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_field = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1254, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_18_set(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), __pyx_v_field, __pyx_v_value);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_18_set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__set(__pyx_v_self, __pyx_v_field, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __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("capnp.lib.capnp._DynamicStructBuilder._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1257
 *         _setDynamicField(self.thisptr, field, value, self._parent)
 * 
 *     cpdef _set_by_field(self, _StructSchemaField field, value):             # <<<<<<<<<<<<<<
 *         _setDynamicFieldWithField(self.thisptr, field, value, self._parent)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_21_set_by_field(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__set_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set_by_field", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_by_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_21_set_by_field)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_field), __pyx_v_value};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1257, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_field), __pyx_v_value};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1257, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1257, __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_field));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_field));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_field));
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1257, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1258
 * 
 *     cpdef _set_by_field(self, _StructSchemaField field, value):
 *         _setDynamicFieldWithField(self.thisptr, field, value, self._parent)             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, field, value):
 */
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5capnp_3lib_5capnp__setDynamicFieldWithField(__pyx_v_self->thisptr, __pyx_v_field, __pyx_v_value, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __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;

  /* "capnp/lib/capnp.pyx":1257
 *         _setDynamicField(self.thisptr, field, value, self._parent)
 * 
 *     cpdef _set_by_field(self, _StructSchemaField field, value):             # <<<<<<<<<<<<<<
 *         _setDynamicFieldWithField(self.thisptr, field, value, self._parent)
 * 
 */

  /* 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_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._set_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_21_set_by_field(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_20_set_by_field[] = "_DynamicStructBuilder._set_by_field(self, _StructSchemaField field, value)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_21_set_by_field(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_set_by_field (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field,&__pyx_n_s_value,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_set_by_field", 1, 2, 2, 1); __PYX_ERR(0, 1257, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_by_field") < 0)) __PYX_ERR(0, 1257, __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_field = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)values[0]);
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_set_by_field", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1257, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._set_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_ptype_5capnp_3lib_5capnp__StructSchemaField, 1, "field", 0))) __PYX_ERR(0, 1257, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_20_set_by_field(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), __pyx_v_field, __pyx_v_value);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_20_set_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set_by_field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__set_by_field(__pyx_v_self, __pyx_v_field, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __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("capnp.lib.capnp._DynamicStructBuilder._set_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1260
 *         _setDynamicFieldWithField(self.thisptr, field, value, self._parent)
 * 
 *     def __setattr__(self, field, value):             # <<<<<<<<<<<<<<
 *         try:
 *             self._set(field, value)
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_23__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_23__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_22__setattr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_field), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_22__setattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);

  /* "capnp/lib/capnp.pyx":1261
 * 
 *     def __setattr__(self, field, value):
 *         try:             # <<<<<<<<<<<<<<
 *             self._set(field, value)
 *         except KjException as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":1262
 *     def __setattr__(self, field, value):
 *         try:
 *             self._set(field, value)             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]
 */
      __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_v_field, __pyx_v_value, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1262, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "capnp/lib/capnp.pyx":1261
 * 
 *     def __setattr__(self, field, value):
 *         try:             # <<<<<<<<<<<<<<
 *             self._set(field, value)
 *         except KjException as e:
 */
    }
    __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_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1263
 *         try:
 *             self._set(field, value)
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 */
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_KjException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1263, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 1263, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;

      /* "capnp/lib/capnp.pyx":1264
 *             self._set(field, value)
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]             # <<<<<<<<<<<<<<
 * 
 *     cpdef _has(self, field):
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_to_python); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_7, Py_None, __pyx_t_11, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(0, 1264, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":1261
 * 
 *     def __setattr__(self, field, value):
 *         try:             # <<<<<<<<<<<<<<
 *             self._set(field, value)
 *         except KjException as e:
 */
    __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_L8_try_end:;
  }

  /* "capnp/lib/capnp.pyx":1260
 *         _setDynamicFieldWithField(self.thisptr, field, value, self._parent)
 * 
 *     def __setattr__(self, field, value):             # <<<<<<<<<<<<<<
 *         try:
 *             self._set(field, 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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1266
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 *     cpdef _has(self, field):             # <<<<<<<<<<<<<<
 *         return self.thisptr.has(field)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_25_has(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__has(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_has", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_25_has)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1267
 * 
 *     cpdef _has(self, field):
 *         return self.thisptr.has(field)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _has_by_field(self, _StructSchemaField field):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1267, __pyx_L1_error)
  try {
    __pyx_t_6 = __pyx_v_self->thisptr.has(__pyx_t_5);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1267, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1266
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 *     cpdef _has(self, field):             # <<<<<<<<<<<<<<
 *         return self.thisptr.has(field)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder._has", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_25_has(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_24_has[] = "_DynamicStructBuilder._has(self, field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_25_has(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_has (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_24_has(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_24_has(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field) {
  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("_has", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__has(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __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("capnp.lib.capnp._DynamicStructBuilder._has", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1269
 *         return self.thisptr.has(field)
 * 
 *     cpdef _has_by_field(self, _StructSchemaField field):             # <<<<<<<<<<<<<<
 *         return self.thisptr.hasByField(field.thisptr)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_27_has_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__has_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_has_by_field", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_by_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_27_has_by_field)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_field)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_field));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1270
 * 
 *     cpdef _has_by_field(self, _StructSchemaField field):
 *         return self.thisptr.hasByField(field.thisptr)             # <<<<<<<<<<<<<<
 * 
 *     cpdef init(self, field, size=None):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.has(__pyx_v_field->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1270, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1269
 *         return self.thisptr.has(field)
 * 
 *     cpdef _has_by_field(self, _StructSchemaField field):             # <<<<<<<<<<<<<<
 *         return self.thisptr.hasByField(field.thisptr)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder._has_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_27_has_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_26_has_by_field[] = "_DynamicStructBuilder._has_by_field(self, _StructSchemaField field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_27_has_by_field(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_has_by_field (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_ptype_5capnp_3lib_5capnp__StructSchemaField, 1, "field", 0))) __PYX_ERR(0, 1269, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_26_has_by_field(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_26_has_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field) {
  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("_has_by_field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__has_by_field(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __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("capnp.lib.capnp._DynamicStructBuilder._has_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1272
 *         return self.thisptr.hasByField(field.thisptr)
 * 
 *     cpdef init(self, field, size=None):             # <<<<<<<<<<<<<<
 *         """Method for initializing fields that are of type union/struct/list
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_29init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_init *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char *__pyx_t_9;
   ::capnp::DynamicValue::Builder __pyx_t_10;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_29init)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_field, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_field, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1272, __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(__pyx_v_field);
          __Pyx_GIVEREF(__pyx_v_field);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_field);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1287
 *         :Raises: :exc:`KjException` if the field isn't in this struct
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             return to_python_builder(self.thisptr.init(field), self._parent)
 *         else:
 */
  __pyx_t_7 = (__pyx_v_size == Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "capnp/lib/capnp.pyx":1288
 *         """
 *         if size is None:
 *             return to_python_builder(self.thisptr.init(field), self._parent)             # <<<<<<<<<<<<<<
 *         else:
 *             return to_python_builder(self.thisptr.init(field, size), self._parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1288, __pyx_L1_error)
    try {
      __pyx_t_10 = __pyx_v_self->thisptr.init(__pyx_t_9);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 1288, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->_parent;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_10), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __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;

    /* "capnp/lib/capnp.pyx":1287
 *         :Raises: :exc:`KjException` if the field isn't in this struct
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             return to_python_builder(self.thisptr.init(field), self._parent)
 *         else:
 */
  }

  /* "capnp/lib/capnp.pyx":1290
 *             return to_python_builder(self.thisptr.init(field), self._parent)
 *         else:
 *             return to_python_builder(self.thisptr.init(field, size), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _init_by_field(self, _StructSchemaField field, size=None):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 1290, __pyx_L1_error)
    __pyx_t_11 = __Pyx_PyInt_As_unsigned_int(__pyx_v_size); if (unlikely((__pyx_t_11 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1290, __pyx_L1_error)
    try {
      __pyx_t_10 = __pyx_v_self->thisptr.init(__pyx_t_9, __pyx_t_11);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 1290, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_v_self->_parent;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_10), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __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;
  }

  /* "capnp/lib/capnp.pyx":1272
 *         return self.thisptr.hasByField(field.thisptr)
 * 
 *     cpdef init(self, field, size=None):             # <<<<<<<<<<<<<<
 *         """Method for initializing fields that are of type union/struct/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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_29init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_28init[] = "_DynamicStructBuilder.init(self, field, size=None)\nMethod for initializing fields that are of type union/struct/list\n\n        Typically, you don't have to worry about initializing structs/unions, so this method is mainly for lists.\n\n        :type field: str\n        :param field: The field name to initialize\n\n        :type size: int\n        :param size: The size of the list to initiialize. This should be None for struct/union initialization.\n\n        :rtype: :class:`_DynamicStructBuilder` or :class:`_DynamicListBuilder`\n\n        :Raises: :exc:`KjException` if the field isn't in this struct\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_29init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_field = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field,&__pyx_n_s_size,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size);
          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_ERR(0, 1272, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_field = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("init", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1272, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_28init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), __pyx_v_field, __pyx_v_size);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_28init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_init __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructBuilder->init(__pyx_v_self, __pyx_v_field, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __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("capnp.lib.capnp._DynamicStructBuilder.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1292
 *             return to_python_builder(self.thisptr.init(field, size), self._parent)
 * 
 *     cpdef _init_by_field(self, _StructSchemaField field, size=None):             # <<<<<<<<<<<<<<
 *         """Method for initializing fields that are of type union/struct/list
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_31_init_by_field(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field *__pyx_optional_args) {
  PyObject *__pyx_v_size = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
   ::capnp::DynamicValue::Builder __pyx_t_9;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_by_field", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_size = __pyx_optional_args->size;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_by_field); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_31_init_by_field)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_field), __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_field), __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1292, __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_field));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_field));
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_field));
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1307
 *         :Raises: :exc:`KjException` if the field isn't in this struct
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             return to_python_builder(self.thisptr.initByField(field.thisptr), self._parent)
 *         else:
 */
  __pyx_t_7 = (__pyx_v_size == Py_None);
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "capnp/lib/capnp.pyx":1308
 *         """
 *         if size is None:
 *             return to_python_builder(self.thisptr.initByField(field.thisptr), self._parent)             # <<<<<<<<<<<<<<
 *         else:
 *             return to_python_builder(self.thisptr.initByField(field.thisptr, size), self._parent)
 */
    __Pyx_XDECREF(__pyx_r);
    try {
      __pyx_t_9 = __pyx_v_self->thisptr.init(__pyx_v_field->thisptr);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 1308, __pyx_L1_error)
    }
    __pyx_t_1 = __pyx_v_self->_parent;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_9), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1308, __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;

    /* "capnp/lib/capnp.pyx":1307
 *         :Raises: :exc:`KjException` if the field isn't in this struct
 *         """
 *         if size is None:             # <<<<<<<<<<<<<<
 *             return to_python_builder(self.thisptr.initByField(field.thisptr), self._parent)
 *         else:
 */
  }

  /* "capnp/lib/capnp.pyx":1310
 *             return to_python_builder(self.thisptr.initByField(field.thisptr), self._parent)
 *         else:
 *             return to_python_builder(self.thisptr.initByField(field.thisptr, size), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef init_resizable_list(self, field):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_10 = __Pyx_PyInt_As_unsigned_int(__pyx_v_size); if (unlikely((__pyx_t_10 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1310, __pyx_L1_error)
    try {
      __pyx_t_9 = __pyx_v_self->thisptr.init(__pyx_v_field->thisptr, __pyx_t_10);
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 1310, __pyx_L1_error)
    }
    __pyx_t_2 = __pyx_v_self->_parent;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_to_python_builder((( ::capnp::DynamicValue::Builder)__pyx_t_9), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __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;
  }

  /* "capnp/lib/capnp.pyx":1292
 *             return to_python_builder(self.thisptr.init(field, size), self._parent)
 * 
 *     cpdef _init_by_field(self, _StructSchemaField field, size=None):             # <<<<<<<<<<<<<<
 *         """Method for initializing fields that are of type union/struct/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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._init_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_31_init_by_field(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_30_init_by_field[] = "_DynamicStructBuilder._init_by_field(self, _StructSchemaField field, size=None)\nMethod for initializing fields that are of type union/struct/list\n\n        Typically, you don't have to worry about initializing structs/unions, so this method is mainly for lists.\n\n        :type field: str\n        :param field: The field name to initialize\n\n        :type size: int\n        :param size: The size of the list to initiialize. This should be None for struct/union initialization.\n\n        :rtype: :class:`_DynamicStructBuilder` or :class:`_DynamicListBuilder`\n\n        :Raises: :exc:`KjException` if the field isn't in this struct\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_31_init_by_field(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_by_field (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field,&__pyx_n_s_size,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size);
          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_by_field") < 0)) __PYX_ERR(0, 1292, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_field = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)values[0]);
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_init_by_field", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1292, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._init_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_field), __pyx_ptype_5capnp_3lib_5capnp__StructSchemaField, 1, "field", 0))) __PYX_ERR(0, 1292, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_30_init_by_field(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), __pyx_v_field, __pyx_v_size);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_30_init_by_field(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_field, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_by_field", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.size = __pyx_v_size;
  __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructBuilder->_init_by_field(__pyx_v_self, __pyx_v_field, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __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("capnp.lib.capnp._DynamicStructBuilder._init_by_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1312
 *             return to_python_builder(self.thisptr.initByField(field.thisptr, size), self._parent)
 * 
 *     cpdef init_resizable_list(self, field):             # <<<<<<<<<<<<<<
 *         """Method for initializing fields that are of type list (of structs)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_33init_resizable_list(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_init_resizable_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
   ::capnp::DynamicValue::Builder __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_resizable_list", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_resizable_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_33init_resizable_list)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1326
 *         :Raises: :exc:`KjException` if the field isn't in this struct
 *         """
 *         return _DynamicResizableListBuilder(self, field, _StructSchema()._init((<C_DynamicValue.Builder>self.thisptr.get(field)).asList().getStructElementType()))             # <<<<<<<<<<<<<<
 * 
 *     cpdef _which_str(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error)
  try {
    __pyx_t_6 = __pyx_v_self->thisptr.get(__pyx_t_5);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1326, __pyx_L1_error)
  }
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1), (( ::capnp::DynamicValue::Builder)__pyx_t_6).as< ::capnp::DynamicList>().getSchema().getStructElementType()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_field);
  __Pyx_GIVEREF(__pyx_v_field);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_field);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicResizableListBuilder), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __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;

  /* "capnp/lib/capnp.pyx":1312
 *             return to_python_builder(self.thisptr.initByField(field.thisptr, size), self._parent)
 * 
 *     cpdef init_resizable_list(self, field):             # <<<<<<<<<<<<<<
 *         """Method for initializing fields that are of type list (of structs)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.init_resizable_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_33init_resizable_list(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_32init_resizable_list[] = "_DynamicStructBuilder.init_resizable_list(self, field)\nMethod for initializing fields that are of type list (of structs)\n\n        This version of init returns a :class:`_DynamicResizableListBuilder` that allows you to add members one at a time (ie. if you don't know the size for sure). This is only meant for lists of Cap'n Proto objects, since for primitive types you can just define a normal python list and fill it yourself.\n\n        .. warning:: You need to call :meth:`_DynamicResizableListBuilder.finish` on the list object before serializing the Cap'n Proto message. Failure to do so will cause your objects not to be written out as well as leaking orphan structs into your message.\n\n        :type field: str\n        :param field: The field name to initialize\n\n        :rtype: :class:`_DynamicResizableListBuilder`\n\n        :Raises: :exc:`KjException` if the field isn't in this struct\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_33init_resizable_list(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init_resizable_list (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_32init_resizable_list(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_32init_resizable_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field) {
  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("init_resizable_list", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_init_resizable_list(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __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("capnp.lib.capnp._DynamicStructBuilder.init_resizable_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1328
 *         return _DynamicResizableListBuilder(self, field, _StructSchema()._init((<C_DynamicValue.Builder>self.thisptr.get(field)).asList().getStructElementType()))
 * 
 *     cpdef _which_str(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_35_which_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__which_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
   ::capnp::StructSchema::Field __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_which_str", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_which_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_35_which_str)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1329
 * 
 *     cpdef _which_str(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "capnp/lib/capnp.pyx":1330
 *     cpdef _which_str(self):
 *         try:
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *         except:
 *             raise KjException("Attempted to call which on a non-union type")
 */
      __Pyx_XDECREF(__pyx_r);
      try {
        __pyx_t_8 = fixMaybe(__pyx_v_self->thisptr.which());
      } catch(...) {
        reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
        __PYX_ERR(0, 1330, __pyx_L3_error)
      }
      __pyx_t_1 = __Pyx_PyStr_FromString(((char *)__pyx_t_8.getProto().getName().cStr())); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":1329
 * 
 *     cpdef _which_str(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:
 */
    }
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1331
 *         try:
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:             # <<<<<<<<<<<<<<
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._which_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 1331, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);

      /* "capnp/lib/capnp.pyx":1332
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:
 *             raise KjException("Attempted to call which on a non-union type")             # <<<<<<<<<<<<<<
 * 
 *     cpdef _DynamicEnumField _which(self):
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_KjException); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1332, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_kp_s_Attempted_to_call_which_on_a_non) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_s_Attempted_to_call_which_on_a_non);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1332, __pyx_L5_except_error)
    }
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":1329
 * 
 *     cpdef _which_str(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":1328
 *         return _DynamicResizableListBuilder(self, field, _StructSchema()._init((<C_DynamicValue.Builder>self.thisptr.get(field)).asList().getStructElementType()))
 * 
 *     cpdef _which_str(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return <char *>helpers.fixMaybe(self.thisptr.which()).getProto().getName().cStr()
 */

  /* 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_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._which_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_35_which_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_34_which_str[] = "_DynamicStructBuilder._which_str(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_35_which_str(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_which_str (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_34_which_str(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_34_which_str(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__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("_which_str", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__which_str(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __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("capnp.lib.capnp._DynamicStructBuilder._which_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1334
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 *     cpdef _DynamicEnumField _which(self):             # <<<<<<<<<<<<<<
 *         """Returns the enum corresponding to the union in this struct
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_37_which(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__which(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_which = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__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;
  PyObject *__pyx_t_7 = NULL;
   ::capnp::StructSchema::Field __pyx_t_8;
  struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_which", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_which_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_37_which)) {
        __Pyx_XDECREF(((PyObject *)__pyx_r));
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5capnp_3lib_5capnp__DynamicEnumField))))) __PYX_ERR(0, 1334, __pyx_L1_error)
        __pyx_r = ((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1342
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "capnp/lib/capnp.pyx":1343
 *         """
 *         try:
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)             # <<<<<<<<<<<<<<
 *         except:
 *             raise KjException("Attempted to call which on a non-union type")
 */
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicEnumField)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchemaField)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1343, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      try {
        __pyx_t_8 = fixMaybe(__pyx_v_self->thisptr.which());
      } catch(...) {
        reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
        __PYX_ERR(0, 1343, __pyx_L3_error)
      }
      __pyx_t_9.__pyx_n = 1;
      __pyx_t_9.parent = ((PyObject *)__pyx_v_self);
      __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchemaField *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_t_2), __pyx_t_8, &__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_proto); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1343, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnumField *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_t_1), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_which = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":1342
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1344
 *         try:
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:             # <<<<<<<<<<<<<<
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._which", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1344, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);

      /* "capnp/lib/capnp.pyx":1345
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:
 *             raise KjException("Attempted to call which on a non-union type")             # <<<<<<<<<<<<<<
 * 
 *         return which
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_KjException); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1345, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_kp_s_Attempted_to_call_which_on_a_non) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_kp_s_Attempted_to_call_which_on_a_non);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1345, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1345, __pyx_L5_except_error)
    }
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":1342
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             which = _DynamicEnumField()._init(_StructSchemaField()._init(helpers.fixMaybe(self.thisptr.which()), self).proto)
 *         except:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }

  /* "capnp/lib/capnp.pyx":1347
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 *         return which             # <<<<<<<<<<<<<<
 * 
 *     property which:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  if (!(likely(((__pyx_v_which) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_which, __pyx_ptype_5capnp_3lib_5capnp__DynamicEnumField))))) __PYX_ERR(0, 1347, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_which);
  __pyx_r = ((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v_which);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1334
 *             raise KjException("Attempted to call which on a non-union type")
 * 
 *     cpdef _DynamicEnumField _which(self):             # <<<<<<<<<<<<<<
 *         """Returns the enum corresponding to the union in this struct
 * 
 */

  /* 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_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._which", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_which);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_37_which(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_36_which[] = "_DynamicStructBuilder._which(self) -> _DynamicEnumField\nReturns the enum corresponding to the union in this struct\n\n        :rtype: :class:`_DynamicEnumField`\n        :return: A string/enum corresponding to what field is set in the union\n\n        :Raises: :exc:`KjException` if this struct doesn't contain a union\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_37_which(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_which (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_36_which(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_36_which(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__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("_which", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__which(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __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("capnp.lib.capnp._DynamicStructBuilder._which", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1357
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         def __get__(_DynamicStructBuilder self):             # <<<<<<<<<<<<<<
 *             return self._which()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_5which_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_5which_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_5which___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_5which___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":1358
 *         """
 *         def __get__(_DynamicStructBuilder self):
 *             return self._which()             # <<<<<<<<<<<<<<
 * 
 *     cpdef adopt(self, field, _DynamicOrphan orphan):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_which(__pyx_v_self, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1357
 *         :Raises: :exc:`KjException` if this struct doesn't contain a union
 *         """
 *         def __get__(_DynamicStructBuilder self):             # <<<<<<<<<<<<<<
 *             return self._which()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.which.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1360
 *             return self._which()
 * 
 *     cpdef adopt(self, field, _DynamicOrphan orphan):             # <<<<<<<<<<<<<<
 *         """A method for adopting Cap'n Proto orphans
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_39adopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_adopt(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("adopt", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_adopt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_39adopt)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_field, ((PyObject *)__pyx_v_orphan)};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_field, ((PyObject *)__pyx_v_orphan)};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1360, __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(__pyx_v_field);
          __Pyx_GIVEREF(__pyx_v_field);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_field);
          __Pyx_INCREF(((PyObject *)__pyx_v_orphan));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_orphan));
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, ((PyObject *)__pyx_v_orphan));
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1373
 *         :rtype: void
 *         """
 *         self.thisptr.adopt(field, orphan.move())             # <<<<<<<<<<<<<<
 * 
 *     cpdef disown(self, field):
 */
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr.adopt(__pyx_t_7, ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_orphan->__pyx_vtab)->move(__pyx_v_orphan));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1373, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":1360
 *             return self._which()
 * 
 *     cpdef adopt(self, field, _DynamicOrphan orphan):             # <<<<<<<<<<<<<<
 *         """A method for adopting Cap'n Proto orphans
 * 
 */

  /* 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_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.adopt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_39adopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_38adopt[] = "_DynamicStructBuilder.adopt(self, field, _DynamicOrphan orphan)\nA method for adopting Cap'n Proto orphans\n\n        Don't use this method unless you know what you're doing. Orphans are useful for dynamically allocating objects for an unknown sized list.\n\n        :type field: str\n        :param field: The field name in the struct\n\n        :type orphan: :class:`_DynamicOrphan`\n        :param orphan: A Cap'n proto orphan to adopt. It will be unusable after this operation.\n\n        :rtype: void\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_39adopt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_field = 0;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("adopt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_field,&__pyx_n_s_orphan,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_field)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_orphan)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("adopt", 1, 2, 2, 1); __PYX_ERR(0, 1360, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "adopt") < 0)) __PYX_ERR(0, 1360, __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_field = values[0];
    __pyx_v_orphan = ((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("adopt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1360, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.adopt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_orphan), __pyx_ptype_5capnp_3lib_5capnp__DynamicOrphan, 1, "orphan", 0))) __PYX_ERR(0, 1360, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_38adopt(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), __pyx_v_field, __pyx_v_orphan);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_38adopt(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_orphan) {
  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("adopt", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_adopt(__pyx_v_self, __pyx_v_field, __pyx_v_orphan, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __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("capnp.lib.capnp._DynamicStructBuilder.adopt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1375
 *         self.thisptr.adopt(field, orphan.move())
 * 
 *     cpdef disown(self, field):             # <<<<<<<<<<<<<<
 *         """A method for disowning Cap'n Proto orphans
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_41disown(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_disown(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("disown", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_disown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_41disown)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1385
 *         :rtype: :class:`_DynamicOrphan`
 *         """
 *         return _DynamicOrphan()._init(self.thisptr.disown(field), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_reader(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicOrphan)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1385, __pyx_L1_error)
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_t_1), __pyx_v_self->thisptr.disown(__pyx_t_5), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1375
 *         self.thisptr.adopt(field, orphan.move())
 * 
 *     cpdef disown(self, field):             # <<<<<<<<<<<<<<
 *         """A method for disowning Cap'n Proto orphans
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.disown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_41disown(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_40disown[] = "_DynamicStructBuilder.disown(self, field)\nA method for disowning Cap'n Proto orphans\n\n        Don't use this method unless you know what you're doing.\n\n        :type field: str\n        :param field: The field name in the struct\n\n        :rtype: :class:`_DynamicOrphan`\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_41disown(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("disown (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_40disown(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_40disown(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_field) {
  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("disown", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_disown(__pyx_v_self, __pyx_v_field, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __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("capnp.lib.capnp._DynamicStructBuilder.disown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1387
 *         return _DynamicOrphan()._init(self.thisptr.disown(field), self._parent)
 * 
 *     cpdef as_reader(self):             # <<<<<<<<<<<<<<
 *         """A method for casting this Builder to a Reader
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_43as_reader(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_as_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *__pyx_v_reader = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader__init __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_reader", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_43as_reader)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1395
 *         """
 *         cdef _DynamicStructReader reader
 *         reader = _DynamicStructReader()._init(self.thisptr.asReader(),             # <<<<<<<<<<<<<<
 *                                             self._parent, self.is_root)
 *         reader._obj_to_pin = self
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "capnp/lib/capnp.pyx":1396
 *         cdef _DynamicStructReader reader
 *         reader = _DynamicStructReader()._init(self.thisptr.asReader(),
 *                                             self._parent, self.is_root)             # <<<<<<<<<<<<<<
 *         reader._obj_to_pin = self
 *         return reader
 */
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);

  /* "capnp/lib/capnp.pyx":1395
 *         """
 *         cdef _DynamicStructReader reader
 *         reader = _DynamicStructReader()._init(self.thisptr.asReader(),             # <<<<<<<<<<<<<<
 *                                             self._parent, self.is_root)
 *         reader._obj_to_pin = self
 */
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.isRoot = __pyx_v_self->is_root;
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1), __pyx_v_self->thisptr.asReader(), __pyx_t_2, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader))))) __PYX_ERR(0, 1395, __pyx_L1_error)
  __pyx_v_reader = ((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":1397
 *         reader = _DynamicStructReader()._init(self.thisptr.asReader(),
 *                                             self._parent, self.is_root)
 *         reader._obj_to_pin = self             # <<<<<<<<<<<<<<
 *         return reader
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_reader->_obj_to_pin);
  __Pyx_DECREF(__pyx_v_reader->_obj_to_pin);
  __pyx_v_reader->_obj_to_pin = ((PyObject *)__pyx_v_self);

  /* "capnp/lib/capnp.pyx":1398
 *                                             self._parent, self.is_root)
 *         reader._obj_to_pin = self
 *         return reader             # <<<<<<<<<<<<<<
 * 
 *     cpdef copy(self, num_first_segment_words=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_reader));
  __pyx_r = ((PyObject *)__pyx_v_reader);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1387
 *         return _DynamicOrphan()._init(self.thisptr.disown(field), self._parent)
 * 
 *     cpdef as_reader(self):             # <<<<<<<<<<<<<<
 *         """A method for casting this Builder to a Reader
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.as_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_43as_reader(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_42as_reader[] = "_DynamicStructBuilder.as_reader(self)\nA method for casting this Builder to a Reader\n\n        This is a non-copying operation with respect to the message's buffer. This means changes to the fields in the original struct will carry over to the new reader.\n\n        :rtype: :class:`_DynamicStructReader`\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_43as_reader(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_42as_reader(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_42as_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__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("as_reader", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_as_reader(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __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("capnp.lib.capnp._DynamicStructBuilder.as_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1400
 *         return reader
 * 
 *     cpdef copy(self, num_first_segment_words=None):             # <<<<<<<<<<<<<<
 *         """A method for copying this Builder
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_45copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy *__pyx_optional_args) {
  PyObject *__pyx_v_num_first_segment_words = ((PyObject *)Py_None);
  struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *__pyx_v_builder = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_num_first_segment_words = __pyx_optional_args->num_first_segment_words;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_45copy)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_num_first_segment_words) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_num_first_segment_words);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1400, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1410
 *         :rtype: :class:`_DynamicStructBuilder`
 *         """
 *         builder = _MallocMessageBuilder(num_first_segment_words)             # <<<<<<<<<<<<<<
 *         return builder.set_root(self)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MallocMessageBuilder), __pyx_v_num_first_segment_words); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_builder = ((struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1411
 *         """
 *         builder = _MallocMessageBuilder(num_first_segment_words)
 *         return builder.set_root(self)             # <<<<<<<<<<<<<<
 * 
 *     property schema:
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__MallocMessageBuilder *)__pyx_v_builder->__pyx_base.__pyx_vtab)->__pyx_base.set_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_builder), ((PyObject *)__pyx_v_self), 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1411, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1400
 *         return reader
 * 
 *     cpdef copy(self, num_first_segment_words=None):             # <<<<<<<<<<<<<<
 *         """A method for copying this Builder
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_builder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_45copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_44copy[] = "_DynamicStructBuilder.copy(self, num_first_segment_words=None)\nA method for copying this Builder\n\n        This is a copying operation with respect to the message's buffer. Changes in the new builder will not reflect in the original reader.\n\n        :type num_first_segment_words: int\n        :param num_first_segment_words: Size of the first segment to allocate in the message (in words ie. 8 byte increments)\n\n        :rtype: :class:`_DynamicStructBuilder`\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_45copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_num_first_segment_words = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_num_first_segment_words,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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num_first_segment_words);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copy") < 0)) __PYX_ERR(0, 1400, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_num_first_segment_words = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("copy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1400, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_44copy(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), __pyx_v_num_first_segment_words);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_44copy(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_num_first_segment_words) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.num_first_segment_words = __pyx_v_num_first_segment_words;
  __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructBuilder->copy(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __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("capnp.lib.capnp._DynamicStructBuilder.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1415
 *     property schema:
 *         """A property that returns the _StructSchema object matching this writer"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._schema is None:
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":1416
 *         """A property that returns the _StructSchema object matching this writer"""
 *         def __get__(self):
 *             if self._schema is None:             # <<<<<<<<<<<<<<
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 *             return self._schema
 */
  __pyx_t_1 = (__pyx_v_self->_schema == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":1417
 *         def __get__(self):
 *             if self._schema is None:
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())             # <<<<<<<<<<<<<<
 *             return self._schema
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchema)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_3), __pyx_v_self->thisptr.getSchema()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->_schema);
    __Pyx_DECREF(__pyx_v_self->_schema);
    __pyx_v_self->_schema = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1416
 *         """A property that returns the _StructSchema object matching this writer"""
 *         def __get__(self):
 *             if self._schema is None:             # <<<<<<<<<<<<<<
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 *             return self._schema
 */
  }

  /* "capnp/lib/capnp.pyx":1418
 *             if self._schema is None:
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 *             return self._schema             # <<<<<<<<<<<<<<
 * 
 *     def __dir__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_schema);
  __pyx_r = __pyx_v_self->_schema;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1415
 *     property schema:
 *         """A property that returns the _StructSchema object matching this writer"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._schema is None:
 *                 self._schema = _StructSchema()._init(self.thisptr.getSchema())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1420
 *             return self._schema
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_47__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_46__dir__[] = "_DynamicStructBuilder.__dir__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_47__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dir__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_46__dir__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_46__dir__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dir__", 0);

  /* "capnp/lib/capnp.pyx":1421
 * 
 *     def __dir__(self):
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fieldnames); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1420
 *             return self._schema
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.__dir__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1423
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>printStructBuilder(self.thisptr).flatten().cStr()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_49__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_49__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_48__str__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_48__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
   ::kj::StringTree __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "capnp/lib/capnp.pyx":1424
 * 
 *     def __str__(self):
 *         return <char*>printStructBuilder(self.thisptr).flatten().cStr()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 =  ::capnp::prettyPrint(__pyx_v_self->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1424, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyStr_FromString(((char *)__pyx_t_1.flatten().cStr())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1423
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return <char*>printStructBuilder(self.thisptr).flatten().cStr()
 * 
 */

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

/* "capnp/lib/capnp.pyx":1426
 *         return <char*>printStructBuilder(self.thisptr).flatten().cStr()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s builder %s>' % (self.schema.node.displayName, <char*>strStructBuilder(self.thisptr).cStr())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_51__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_51__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_50__repr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_50__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "capnp/lib/capnp.pyx":1427
 * 
 *     def __repr__(self):
 *         return '<%s builder %s>' % (self.schema.node.displayName, <char*>strStructBuilder(self.thisptr).cStr())             # <<<<<<<<<<<<<<
 * 
 *     def to_dict(self, verbose=False, ordered=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_displayName); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyStr_FromString(((char *) ::kj::str(__pyx_v_self->thisptr).cStr())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_builder_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1427, __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;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1426
 *         return <char*>printStructBuilder(self.thisptr).flatten().cStr()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s builder %s>' % (self.schema.node.displayName, <char*>strStructBuilder(self.thisptr).cStr())
 * 
 */

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

/* "capnp/lib/capnp.pyx":1429
 *         return '<%s builder %s>' % (self.schema.node.displayName, <char*>strStructBuilder(self.thisptr).cStr())
 * 
 *     def to_dict(self, verbose=False, ordered=False):             # <<<<<<<<<<<<<<
 *         return _to_dict(self, verbose, ordered)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_53to_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_52to_dict[] = "_DynamicStructBuilder.to_dict(self, verbose=False, ordered=False)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_53to_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_ordered = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_verbose,&__pyx_n_s_ordered,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_False);
    values[1] = ((PyObject *)Py_False);
    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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ordered);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_dict") < 0)) __PYX_ERR(0, 1429, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_verbose = values[0];
    __pyx_v_ordered = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_dict", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1429, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_52to_dict(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), __pyx_v_verbose, __pyx_v_ordered);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_52to_dict(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_ordered) {
  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("to_dict", 0);

  /* "capnp/lib/capnp.pyx":1430
 * 
 *     def to_dict(self, verbose=False, ordered=False):
 *         return _to_dict(self, verbose, ordered)             # <<<<<<<<<<<<<<
 * 
 *     def from_dict(self, dict d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1430, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ordered); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1430, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp__to_dict(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1429
 *         return '<%s builder %s>' % (self.schema.node.displayName, <char*>strStructBuilder(self.thisptr).cStr())
 * 
 *     def to_dict(self, verbose=False, ordered=False):             # <<<<<<<<<<<<<<
 *         return _to_dict(self, verbose, ordered)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1432
 *         return _to_dict(self, verbose, ordered)
 * 
 *     def from_dict(self, dict d):             # <<<<<<<<<<<<<<
 *         for key, val in d.iteritems():
 *             if key != 'which':
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_55from_dict(PyObject *__pyx_v_self, PyObject *__pyx_v_d); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_54from_dict[] = "_DynamicStructBuilder.from_dict(self, dict d)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_55from_dict(PyObject *__pyx_v_self, PyObject *__pyx_v_d) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_dict (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_d), (&PyDict_Type), 1, "d", 1))) __PYX_ERR(0, 1432, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_54from_dict(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject*)__pyx_v_d));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_54from_dict(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_d) {
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_dict", 0);

  /* "capnp/lib/capnp.pyx":1433
 * 
 *     def from_dict(self, dict d):
 *         for key, val in d.iteritems():             # <<<<<<<<<<<<<<
 *             if key != 'which':
 *                 try:
 */
  __pyx_t_2 = 0;
  if (unlikely(__pyx_v_d == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
    __PYX_ERR(0, 1433, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_d, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "capnp/lib/capnp.pyx":1434
 *     def from_dict(self, dict d):
 *         for key, val in d.iteritems():
 *             if key != 'which':             # <<<<<<<<<<<<<<
 *                 try:
 *                     self._set(key, val)
 */
    __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_which, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1434, __pyx_L1_error)
    if (__pyx_t_8) {

      /* "capnp/lib/capnp.pyx":1435
 *         for key, val in d.iteritems():
 *             if key != 'which':
 *                 try:             # <<<<<<<<<<<<<<
 *                     self._set(key, val)
 *                 except Exception as e:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        /*try:*/ {

          /* "capnp/lib/capnp.pyx":1436
 *             if key != 'which':
 *                 try:
 *                     self._set(key, val)             # <<<<<<<<<<<<<<
 *                 except Exception as e:
 *                     if 'expected isSetInUnion(field)' in str(e):
 */
          __pyx_t_6 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_v_key, __pyx_v_val, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "capnp/lib/capnp.pyx":1435
 *         for key, val in d.iteritems():
 *             if key != 'which':
 *                 try:             # <<<<<<<<<<<<<<
 *                     self._set(key, val)
 *                 except Exception as e:
 */
        }
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L13_try_end;
        __pyx_L6_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "capnp/lib/capnp.pyx":1437
 *                 try:
 *                     self._set(key, val)
 *                 except Exception as e:             # <<<<<<<<<<<<<<
 *                     if 'expected isSetInUnion(field)' in str(e):
 *                         self.init(key)
 */
        __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
        if (__pyx_t_7) {
          __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_12) < 0) __PYX_ERR(0, 1437, __pyx_L8_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_5);

          /* "capnp/lib/capnp.pyx":1438
 *                     self._set(key, val)
 *                 except Exception as e:
 *                     if 'expected isSetInUnion(field)' in str(e):             # <<<<<<<<<<<<<<
 *                         self.init(key)
 *                         self._set(key, val)
 */
          __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_e); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1438, __pyx_L8_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s_expected_isSetInUnion_field, __pyx_t_13, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1438, __pyx_L8_except_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_14 = (__pyx_t_8 != 0);
          if (likely(__pyx_t_14)) {

            /* "capnp/lib/capnp.pyx":1439
 *                 except Exception as e:
 *                     if 'expected isSetInUnion(field)' in str(e):
 *                         self.init(key)             # <<<<<<<<<<<<<<
 *                         self._set(key, val)
 *                     else:
 */
            __pyx_t_13 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->init(__pyx_v_self, __pyx_v_key, 0, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1439, __pyx_L8_except_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

            /* "capnp/lib/capnp.pyx":1440
 *                     if 'expected isSetInUnion(field)' in str(e):
 *                         self.init(key)
 *                         self._set(key, val)             # <<<<<<<<<<<<<<
 *                     else:
 *                         raise
 */
            __pyx_t_13 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_v_key, __pyx_v_val, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1440, __pyx_L8_except_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

            /* "capnp/lib/capnp.pyx":1438
 *                     self._set(key, val)
 *                 except Exception as e:
 *                     if 'expected isSetInUnion(field)' in str(e):             # <<<<<<<<<<<<<<
 *                         self.init(key)
 *                         self._set(key, val)
 */
            goto __pyx_L16;
          }

          /* "capnp/lib/capnp.pyx":1442
 *                         self._set(key, val)
 *                     else:
 *                         raise             # <<<<<<<<<<<<<<
 * 
 *     property total_size:
 */
          /*else*/ {
            __Pyx_GIVEREF(__pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_5);
            __Pyx_XGIVEREF(__pyx_t_12);
            __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_5, __pyx_t_12);
            __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_12 = 0; 
            __PYX_ERR(0, 1442, __pyx_L8_except_error)
          }
          __pyx_L16:;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L7_exception_handled;
        }
        goto __pyx_L8_except_error;
        __pyx_L8_except_error:;

        /* "capnp/lib/capnp.pyx":1435
 *         for key, val in d.iteritems():
 *             if key != 'which':
 *                 try:             # <<<<<<<<<<<<<<
 *                     self._set(key, val)
 *                 except Exception as e:
 */
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        goto __pyx_L1_error;
        __pyx_L7_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        __pyx_L13_try_end:;
      }

      /* "capnp/lib/capnp.pyx":1434
 *     def from_dict(self, dict d):
 *         for key, val in d.iteritems():
 *             if key != 'which':             # <<<<<<<<<<<<<<
 *                 try:
 *                     self._set(key, val)
 */
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1432
 *         return _to_dict(self, verbose, ordered)
 * 
 *     def from_dict(self, dict d):             # <<<<<<<<<<<<<<
 *         for key, val in d.iteritems():
 *             if key != 'which':
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1445
 * 
 *     property total_size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             size = self.thisptr.totalSize()
 *             return _MessageSize(size.wordCount, size.capCount)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_10total_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_10total_size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_10total_size___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_10total_size___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
   ::capnp::MessageSize __pyx_v_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":1446
 *     property total_size:
 *         def __get__(self):
 *             size = self.thisptr.totalSize()             # <<<<<<<<<<<<<<
 *             return _MessageSize(size.wordCount, size.capCount)
 * 
 */
  __pyx_v_size = __pyx_v_self->thisptr.totalSize();

  /* "capnp/lib/capnp.pyx":1447
 *         def __get__(self):
 *             size = self.thisptr.totalSize()
 *             return _MessageSize(size.wordCount, size.capCount)             # <<<<<<<<<<<<<<
 * 
 *     def clear_write_flag(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_size.wordCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_size.capCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MessageSize), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1447, __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;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1445
 * 
 *     property total_size:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             size = self.thisptr.totalSize()
 *             return _MessageSize(size.wordCount, size.capCount)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.total_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1449
 *             return _MessageSize(size.wordCount, size.capCount)
 * 
 *     def clear_write_flag(self):             # <<<<<<<<<<<<<<
 *         """A method used to clear the _is_written flag.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_57clear_write_flag(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_56clear_write_flag[] = "_DynamicStructBuilder.clear_write_flag(self)\nA method used to clear the _is_written flag.\n\n        This allows you to write the struct more than once without seeing any warnings.\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_57clear_write_flag(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear_write_flag (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_56clear_write_flag(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_56clear_write_flag(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear_write_flag", 0);

  /* "capnp/lib/capnp.pyx":1454
 *         This allows you to write the struct more than once without seeing any warnings.
 *         """
 *         self._is_written = False             # <<<<<<<<<<<<<<
 * 
 *     def __reduce_ex__(self, proto):
 */
  __pyx_v_self->_is_written = 0;

  /* "capnp/lib/capnp.pyx":1449
 *             return _MessageSize(size.wordCount, size.capCount)
 * 
 *     def clear_write_flag(self):             # <<<<<<<<<<<<<<
 *         """A method used to clear the _is_written flag.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1456
 *         self._is_written = False
 * 
 *     def __reduce_ex__(self, proto):             # <<<<<<<<<<<<<<
 *         return _struct_reducer, (self.schema.node.id, self.to_bytes())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_59__reduce_ex__(PyObject *__pyx_v_self, PyObject *__pyx_v_proto); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_58__reduce_ex__[] = "_DynamicStructBuilder.__reduce_ex__(self, proto)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_59__reduce_ex__(PyObject *__pyx_v_self, PyObject *__pyx_v_proto) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_ex__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_58__reduce_ex__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_proto));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_58__reduce_ex__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_proto) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_ex__", 0);

  /* "capnp/lib/capnp.pyx":1457
 * 
 *     def __reduce_ex__(self, proto):
 *         return _struct_reducer, (self.schema.node.id, self.to_bytes())             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicStructPipeline:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_struct_reducer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  try {
    __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self->__pyx_vtab)->to_bytes(__pyx_v_self, 0);
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1457, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1456
 *         self._is_written = False
 * 
 *     def __reduce_ex__(self, proto):             # <<<<<<<<<<<<<<
 *         return _struct_reducer, (self.schema.node.id, self.to_bytes())
 * 
 */

  /* 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("capnp.lib.capnp._DynamicStructBuilder.__reduce_ex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pxd":61
 * cdef class _DynamicStructBuilder:
 *     cdef DynamicStruct_Builder thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 *     cdef public bint is_root
 *     cdef public bint _is_written
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "capnp/lib/capnp.pxd":62
 *     cdef DynamicStruct_Builder thisptr
 *     cdef public object _parent
 *     cdef public bint is_root             # <<<<<<<<<<<<<<
 *     cdef public bint _is_written
 *     cdef object _schema
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 62, __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("capnp.lib.capnp._DynamicStructBuilder.is_root.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 62, __pyx_L1_error)
  __pyx_v_self->is_root = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder.is_root.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pxd":63
 *     cdef public object _parent
 *     cdef public bint is_root
 *     cdef public bint _is_written             # <<<<<<<<<<<<<<
 *     cdef object _schema
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_is_written); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 63, __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("capnp.lib.capnp._DynamicStructBuilder._is_written.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 63, __pyx_L1_error)
  __pyx_v_self->_is_written = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructBuilder._is_written.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1467
 *     cdef public object _parent
 * 
 *     cdef _init(self, C_DynamicStruct.Pipeline * other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_22_DynamicStructPipeline__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self,  ::capnp::DynamicStruct::Pipeline *__pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":1468
 * 
 *     cdef _init(self, C_DynamicStruct.Pipeline * other, object parent):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":1469
 *     cdef _init(self, C_DynamicStruct.Pipeline * other, object parent):
 *         self.thisptr = other
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":1470
 *         self.thisptr = other
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1467
 *     cdef public object _parent
 * 
 *     cdef _init(self, C_DynamicStruct.Pipeline * other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":1472
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline___dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":1473
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get(self, field) except +reraise_kj_exception:
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1472
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":1475
 *         del self.thisptr
 * 
 *     cpdef _get(self, field) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_3_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_22_DynamicStructPipeline__get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  int __pyx_v_type;
  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;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_3_get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1475, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1476
 * 
 *     cpdef _get(self, field) except +reraise_kj_exception:
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()             # <<<<<<<<<<<<<<
 *         if type == capnp.TYPE_CAPABILITY:
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 */
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1476, __pyx_L1_error)
  __pyx_v_type = (( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).getType();

  /* "capnp/lib/capnp.pyx":1477
 *     cpdef _get(self, field) except +reraise_kj_exception:
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:             # <<<<<<<<<<<<<<
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 *         elif type == capnp.TYPE_STRUCT:
 */
  switch (__pyx_v_type) {
    case  ::capnp::DynamicValue::CAPABILITY:

    /* "capnp/lib/capnp.pyx":1478
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)             # <<<<<<<<<<<<<<
 *         elif type == capnp.TYPE_STRUCT:
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L1_error)
    __pyx_t_2 = __pyx_v_self->_parent;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), (( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).releaseAs< ::capnp::DynamicCapability>(), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":1477
 *     cpdef _get(self, field) except +reraise_kj_exception:
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:             # <<<<<<<<<<<<<<
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 *         elif type == capnp.TYPE_STRUCT:
 */
    break;
    case  ::capnp::DynamicValue::STRUCT:

    /* "capnp/lib/capnp.pyx":1480
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 *         elif type == capnp.TYPE_STRUCT:
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)             # <<<<<<<<<<<<<<
 *         elif type == capnp.TYPE_UNKNOWN:
 *             raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructPipeline)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1480, __pyx_L1_error)
    __pyx_t_2 = __pyx_v_self->_parent;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructPipeline *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_t_3), new  ::capnp::DynamicStruct::Pipeline((( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).releaseAs< ::capnp::DynamicStruct>()), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":1479
 *         if type == capnp.TYPE_CAPABILITY:
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 *         elif type == capnp.TYPE_STRUCT:             # <<<<<<<<<<<<<<
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
 *         elif type == capnp.TYPE_UNKNOWN:
 */
    break;
    case  ::capnp::DynamicValue::UNKNOWN:

    /* "capnp/lib/capnp.pyx":1482
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
 *         elif type == capnp.TYPE_UNKNOWN:
 *             raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")             # <<<<<<<<<<<<<<
 *         else:
 *             raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Cannot_convert_type_to_Python_Ty) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Cannot_convert_type_to_Python_Ty);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1482, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1481
 *         elif type == capnp.TYPE_STRUCT:
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
 *         elif type == capnp.TYPE_UNKNOWN:             # <<<<<<<<<<<<<<
 *             raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 *         else:
 */
    break;
    default:

    /* "capnp/lib/capnp.pyx":1484
 *             raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 *         else:
 *             raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, field):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Cannot_convert_type_to_Python_Ty_2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Cannot_convert_type_to_Python_Ty_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1484, __pyx_L1_error)
    break;
  }

  /* "capnp/lib/capnp.pyx":1475
 *         del self.thisptr
 * 
 *     cpdef _get(self, field) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:
 */

  /* 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("capnp.lib.capnp._DynamicStructPipeline._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_3_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_2_get[] = "_DynamicStructPipeline._get(self, field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_3_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_2_get(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_2_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_22_DynamicStructPipeline__get(__pyx_v_self, __pyx_v_field, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1475, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1475, __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("capnp.lib.capnp._DynamicStructPipeline._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1486
 *             raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return self._get(field)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_5__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_5__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_4__getattr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_4__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "capnp/lib/capnp.pyx":1487
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":1488
 *     def __getattr__(self, field):
 *         try:
 *             return self._get(field)             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]
 */
      __Pyx_XDECREF(__pyx_r);
      try {
        __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_field, 0);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1488, __pyx_L3_error)
      } catch(...) {
        reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
        __PYX_ERR(0, 1488, __pyx_L3_error)
      }
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":1487
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1489
 *         try:
 *             return self._get(field)
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 */
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_KjException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1489, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructPipeline.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 1489, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;

      /* "capnp/lib/capnp.pyx":1490
 *             return self._get(field)
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]             # <<<<<<<<<<<<<<
 * 
 *     property schema:
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_to_python); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1490, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1490, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1490, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1490, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1490, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1490, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_7, Py_None, __pyx_t_11, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(0, 1490, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":1487
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":1486
 *             raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return self._get(field)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructPipeline.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1494
 *     property schema:
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _StructSchema()._init(self.thisptr.getSchema())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__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("__get__", 0);

  /* "capnp/lib/capnp.pyx":1495
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):
 *             return _StructSchema()._init(self.thisptr.getSchema())             # <<<<<<<<<<<<<<
 * 
 *     def __dir__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1), __pyx_v_self->thisptr->getSchema()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __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;

  /* "capnp/lib/capnp.pyx":1494
 *     property schema:
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _StructSchema()._init(self.thisptr.getSchema())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructPipeline.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1497
 *             return _StructSchema()._init(self.thisptr.getSchema())
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_6__dir__[] = "_DynamicStructPipeline.__dir__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dir__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_6__dir__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_6__dir__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dir__", 0);

  /* "capnp/lib/capnp.pyx":1498
 * 
 *     def __dir__(self):
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))             # <<<<<<<<<<<<<<
 * 
 *     # def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fieldnames); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1497
 *             return _StructSchema()._init(self.thisptr.getSchema())
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructPipeline.__dir__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1506
 *     #     return '<%s reader %s>' % (self.schema.node.displayName, strStructReader(self.thisptr).cStr())
 * 
 *     def to_dict(self, verbose=False, ordered=False):             # <<<<<<<<<<<<<<
 *         return _to_dict(self, verbose, ordered)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_9to_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_8to_dict[] = "_DynamicStructPipeline.to_dict(self, verbose=False, ordered=False)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_9to_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_ordered = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_verbose,&__pyx_n_s_ordered,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_False);
    values[1] = ((PyObject *)Py_False);
    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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ordered);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_dict") < 0)) __PYX_ERR(0, 1506, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_verbose = values[0];
    __pyx_v_ordered = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_dict", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1506, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructPipeline.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_8to_dict(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self), __pyx_v_verbose, __pyx_v_ordered);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_8to_dict(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_ordered) {
  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("to_dict", 0);

  /* "capnp/lib/capnp.pyx":1507
 * 
 *     def to_dict(self, verbose=False, ordered=False):
 *         return _to_dict(self, verbose, ordered)             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicOrphan:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1507, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ordered); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1507, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp__to_dict(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1506
 *     #     return '<%s reader %s>' % (self.schema.node.displayName, strStructReader(self.thisptr).cStr())
 * 
 *     def to_dict(self, verbose=False, ordered=False):             # <<<<<<<<<<<<<<
 *         return _to_dict(self, verbose, ordered)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructPipeline.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1465
 *     """
 *     cdef C_DynamicStruct.Pipeline * thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, C_DynamicStruct.Pipeline * other, object parent):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_10__reduce_cython__[] = "_DynamicStructPipeline.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_10__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructPipeline.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_12__setstate_cython__[] = "_DynamicStructPipeline.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_12__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_DynamicStructPipeline_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicStructPipeline.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1510
 * 
 * cdef class _DynamicOrphan:
 *     cdef _init(self, C_DynamicOrphan other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = moveOrphan(other)
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self,  ::capnp::Orphan< ::capnp::DynamicValue> __pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":1511
 * cdef class _DynamicOrphan:
 *     cdef _init(self, C_DynamicOrphan other, object parent):
 *         self.thisptr = moveOrphan(other)             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = std::move(__pyx_v_other);

  /* "capnp/lib/capnp.pyx":1512
 *     cdef _init(self, C_DynamicOrphan other, object parent):
 *         self.thisptr = moveOrphan(other)
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":1513
 *         self.thisptr = moveOrphan(other)
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef C_DynamicOrphan move(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1510
 * 
 * cdef class _DynamicOrphan:
 *     cdef _init(self, C_DynamicOrphan other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = moveOrphan(other)
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":1515
 *         return self
 * 
 *     cdef C_DynamicOrphan move(self):             # <<<<<<<<<<<<<<
 *         return moveOrphan(self.thisptr)
 * 
 */

static  ::capnp::Orphan< ::capnp::DynamicValue> __pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan_move(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self) {
   ::capnp::Orphan< ::capnp::DynamicValue> __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("move", 0);

  /* "capnp/lib/capnp.pyx":1516
 * 
 *     cdef C_DynamicOrphan move(self):
 *         return moveOrphan(self.thisptr)             # <<<<<<<<<<<<<<
 * 
 *     cpdef get(self):
 */
  __pyx_r = std::move(__pyx_v_self->thisptr);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1515
 *         return self
 * 
 *     cdef C_DynamicOrphan move(self):             # <<<<<<<<<<<<<<
 *         return moveOrphan(self.thisptr)
 * 
 */

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

/* "capnp/lib/capnp.pyx":1518
 *         return moveOrphan(self.thisptr)
 * 
 *     cpdef get(self):             # <<<<<<<<<<<<<<
 *         """Returns a python object corresponding to the DynamicValue owned by this orphan
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_1get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_1get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1518, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1523
 *         Use this DynamicValue to set fields inside the orphan
 *         """
 *         return to_python_builder(self.thisptr.get(), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5capnp_3lib_5capnp_to_python_builder(__pyx_v_self->thisptr.get(), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __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;

  /* "capnp/lib/capnp.pyx":1518
 *         return moveOrphan(self.thisptr)
 * 
 *     cpdef get(self):             # <<<<<<<<<<<<<<
 *         """Returns a python object corresponding to the DynamicValue owned by this orphan
 * 
 */

  /* 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("capnp.lib.capnp._DynamicOrphan.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_1get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_DynamicOrphan_get[] = "_DynamicOrphan.get(self)\nReturns a python object corresponding to the DynamicValue owned by this orphan\n\n        Use this DynamicValue to set fields inside the orphan\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_1get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_get(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_get(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan_get(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __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("capnp.lib.capnp._DynamicOrphan.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1525
 *         return to_python_builder(self.thisptr.get(), self._parent)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(self.get())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_3__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_2__str__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_2__str__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__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);

  /* "capnp/lib/capnp.pyx":1526
 * 
 *     def __str__(self):
 *         return str(self.get())             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __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;

  /* "capnp/lib/capnp.pyx":1525
 *         return to_python_builder(self.thisptr.get(), self._parent)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(self.get())
 * 
 */

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

/* "capnp/lib/capnp.pyx":1528
 *         return str(self.get())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(self.get())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_4__repr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_4__repr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__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);

  /* "capnp/lib/capnp.pyx":1529
 * 
 *     def __repr__(self):
 *         return repr(self.get())             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicObjectReader:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __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;

  /* "capnp/lib/capnp.pyx":1528
 *         return str(self.get())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(self.get())
 * 
 */

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

/* "capnp/lib/capnp.pxd":32
 * cdef class _DynamicOrphan:
 *     cdef C_DynamicOrphan thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, C_DynamicOrphan other, object parent)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_DynamicOrphan_6__reduce_cython__[] = "_DynamicOrphan.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_6__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicOrphan.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_DynamicOrphan_8__setstate_cython__[] = "_DynamicOrphan.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_8__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_DynamicOrphan_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicOrphan.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1535
 *     cdef public object _parent
 * 
 *     cdef _init(self, C_DynamicObject.Reader other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self,  ::capnp::AnyPointer::Reader __pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":1536
 * 
 *     cdef _init(self, C_DynamicObject.Reader other, object parent):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":1537
 *     cdef _init(self, C_DynamicObject.Reader other, object parent):
 *         self.thisptr = other
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":1538
 *         self.thisptr = other
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1535
 *     cdef public object _parent
 * 
 *     cdef _init(self, C_DynamicObject.Reader other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":1540
 *         return self
 * 
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_1as_struct(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_struct(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
   ::capnp::DynamicStruct::Reader __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_struct", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_1as_struct)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1542
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1542, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":1543
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 1543, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1542
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":1545
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         return _DynamicStructReader()._init(self.thisptr.getAs(s.thisptr), self._parent)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 1545, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":1547
 *             s = schema
 * 
 *         return _DynamicStructReader()._init(self.thisptr.getAs(s.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_7 = __pyx_v_self->thisptr.getAs< ::capnp::DynamicStruct>(__pyx_v_s->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1547, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1), __pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1540
 *         return self
 * 
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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("capnp.lib.capnp._DynamicObjectReader.as_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_1as_struct(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_as_struct[] = "_DynamicObjectReader.as_struct(self, schema)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_1as_struct(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_struct (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_as_struct(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_as_struct(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("as_struct", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_struct(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1540, __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("capnp.lib.capnp._DynamicObjectReader.as_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1549
 *         return _DynamicStructReader()._init(self.thisptr.getAs(s.thisptr), self._parent)
 * 
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_3as_interface(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_interface(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
   ::capnp::DynamicCapability::Client __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_interface", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_interface); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_3as_interface)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1551
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1551, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":1552
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 1552, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1551
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":1554
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         return _DynamicCapabilityClient()._init(self.thisptr.getAsCapability(s.thisptr), self._parent)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 1554, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":1556
 *             s = schema
 * 
 *         return _DynamicCapabilityClient()._init(self.thisptr.getAsCapability(s.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_list(self, schema) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_7 = __pyx_v_self->thisptr.getAs< ::capnp::DynamicCapability>(__pyx_v_s->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1556, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1549
 *         return _DynamicStructReader()._init(self.thisptr.getAs(s.thisptr), self._parent)
 * 
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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("capnp.lib.capnp._DynamicObjectReader.as_interface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_3as_interface(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_2as_interface[] = "_DynamicObjectReader.as_interface(self, schema)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_3as_interface(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_interface (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_2as_interface(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_2as_interface(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("as_interface", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_interface(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1549, __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("capnp.lib.capnp._DynamicObjectReader.as_interface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1558
 *         return _DynamicCapabilityClient()._init(self.thisptr.getAsCapability(s.thisptr), self._parent)
 * 
 *     cpdef as_list(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_5as_list(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
   ::capnp::DynamicList::Reader __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_list", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_5as_list)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1558, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1560
 *     cpdef as_list(self, schema) except +reraise_kj_exception:
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1560, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":1561
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__ListSchema))))) __PYX_ERR(0, 1561, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1560
 *     cpdef as_list(self, schema) except +reraise_kj_exception:
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":1563
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         return _DynamicListReader()._init(self.thisptr.getAsList(s.thisptr), self._parent)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__ListSchema))))) __PYX_ERR(0, 1563, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":1565
 *             s = schema
 * 
 *         return _DynamicListReader()._init(self.thisptr.getAsList(s.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_text(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicListReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_7 = __pyx_v_self->thisptr.getAs< ::capnp::DynamicList>(__pyx_v_s->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1565, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)__pyx_t_1), __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1558
 *         return _DynamicCapabilityClient()._init(self.thisptr.getAsCapability(s.thisptr), self._parent)
 * 
 *     cpdef as_list(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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("capnp.lib.capnp._DynamicObjectReader.as_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_5as_list(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_4as_list[] = "_DynamicObjectReader.as_list(self, schema)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_5as_list(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_list (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_4as_list(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_4as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("as_list", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_list(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1558, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1558, __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("capnp.lib.capnp._DynamicObjectReader.as_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1567
 *         return _DynamicListReader()._init(self.thisptr.getAsList(s.thisptr), self._parent)
 * 
 *     cpdef as_text(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return (<char*>self.thisptr.getAsText().cStr())[:]
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7as_text(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::kj::StringPtr __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_text", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7as_text)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1568
 * 
 *     cpdef as_text(self) except +reraise_kj_exception:
 *         return (<char*>self.thisptr.getAsText().cStr())[:]             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicObjectBuilder:
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.getAs< ::capnp::Text>();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1568, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *)__pyx_t_5.cStr()) + 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1567
 *         return _DynamicListReader()._init(self.thisptr.getAsList(s.thisptr), self._parent)
 * 
 *     cpdef as_text(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return (<char*>self.thisptr.getAsText().cStr())[:]
 * 
 */

  /* 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("capnp.lib.capnp._DynamicObjectReader.as_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7as_text(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_6as_text[] = "_DynamicObjectReader.as_text(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7as_text(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_text (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_6as_text(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_6as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__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("as_text", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_text(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1567, __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("capnp.lib.capnp._DynamicObjectReader.as_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1533
 * cdef class _DynamicObjectReader:
 *     cdef C_DynamicObject.Reader thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, C_DynamicObject.Reader other, object parent):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_8__reduce_cython__[] = "_DynamicObjectReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_8__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicObjectReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_10__setstate_cython__[] = "_DynamicObjectReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_10__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_DynamicObjectReader_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicObjectReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1574
 *     cdef public object _parent
 * 
 *     cdef _init(self, C_DynamicObject.Builder other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = new C_DynamicObject.Builder(other)
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self,  ::capnp::AnyPointer::Builder __pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":1575
 * 
 *     cdef _init(self, C_DynamicObject.Builder other, object parent):
 *         self.thisptr = new C_DynamicObject.Builder(other)             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = new  ::capnp::AnyPointer::Builder(__pyx_v_other);

  /* "capnp/lib/capnp.pyx":1576
 *     cdef _init(self, C_DynamicObject.Builder other, object parent):
 *         self.thisptr = new C_DynamicObject.Builder(other)
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":1577
 *         self.thisptr = new C_DynamicObject.Builder(other)
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1574
 *     cdef public object _parent
 * 
 *     cdef _init(self, C_DynamicObject.Builder other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = new C_DynamicObject.Builder(other)
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":1579
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder___dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":1580
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1579
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":1582
 *         del self.thisptr
 * 
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_3as_struct(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_struct(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
   ::capnp::DynamicStruct::Builder __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_struct", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_3as_struct)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1582, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1584
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1584, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":1585
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 1585, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1584
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":1587
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         return _DynamicStructBuilder()._init(self.thisptr.getAs(s.thisptr), self._parent)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 1587, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":1589
 *             s = schema
 * 
 *         return _DynamicStructBuilder()._init(self.thisptr.getAs(s.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_7 = __pyx_v_self->thisptr->getAs< ::capnp::DynamicStruct>(__pyx_v_s->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1589, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_1), __pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1582
 *         del self.thisptr
 * 
 *     cpdef as_struct(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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("capnp.lib.capnp._DynamicObjectBuilder.as_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_3as_struct(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_2as_struct[] = "_DynamicObjectBuilder.as_struct(self, schema)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_3as_struct(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_struct (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_2as_struct(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_2as_struct(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("as_struct", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_struct(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1582, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1582, __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("capnp.lib.capnp._DynamicObjectBuilder.as_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1591
 *         return _DynamicStructBuilder()._init(self.thisptr.getAs(s.thisptr), self._parent)
 * 
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_5as_interface(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_interface(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
   ::capnp::DynamicCapability::Client __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_interface", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_interface); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_5as_interface)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1591, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1593
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1593, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":1594
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 1594, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1593
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":1596
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         return _DynamicCapabilityClient()._init(self.thisptr.getAsCapability(s.thisptr), self._parent)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 1596, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":1598
 *             s = schema
 * 
 *         return _DynamicCapabilityClient()._init(self.thisptr.getAsCapability(s.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_list(self, schema) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_7 = __pyx_v_self->thisptr->getAs< ::capnp::DynamicCapability>(__pyx_v_s->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1598, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1591
 *         return _DynamicStructBuilder()._init(self.thisptr.getAs(s.thisptr), self._parent)
 * 
 *     cpdef as_interface(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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("capnp.lib.capnp._DynamicObjectBuilder.as_interface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_5as_interface(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_4as_interface[] = "_DynamicObjectBuilder.as_interface(self, schema)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_5as_interface(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_interface (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_4as_interface(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_4as_interface(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("as_interface", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_interface(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1591, __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("capnp.lib.capnp._DynamicObjectBuilder.as_interface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1600
 *         return _DynamicCapabilityClient()._init(self.thisptr.getAsCapability(s.thisptr), self._parent)
 * 
 *     cpdef as_list(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7as_list(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
   ::capnp::DynamicList::Builder __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_list", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7as_list)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1600, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1602
 *     cpdef as_list(self, schema) except +reraise_kj_exception:
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1602, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":1603
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__ListSchema))))) __PYX_ERR(0, 1603, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1602
 *     cpdef as_list(self, schema) except +reraise_kj_exception:
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":1605
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         return _DynamicListBuilder()._init(self.thisptr.getAsList(s.thisptr), self._parent)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__ListSchema))))) __PYX_ERR(0, 1605, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":1607
 *             s = schema
 * 
 *         return _DynamicListBuilder()._init(self.thisptr.getAsList(s.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef set(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_7 = __pyx_v_self->thisptr->getAs< ::capnp::DynamicList>(__pyx_v_s->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1607, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_t_1), __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1600
 *         return _DynamicCapabilityClient()._init(self.thisptr.getAsCapability(s.thisptr), self._parent)
 * 
 *     cpdef as_list(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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("capnp.lib.capnp._DynamicObjectBuilder.as_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7as_list(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_6as_list[] = "_DynamicObjectBuilder.as_list(self, schema)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7as_list(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_list (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_6as_list(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_6as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("as_list", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_list(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1600, __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("capnp.lib.capnp._DynamicObjectBuilder.as_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1609
 *         return _DynamicListBuilder()._init(self.thisptr.getAsList(s.thisptr), self._parent)
 * 
 *     cpdef set(self, other):             # <<<<<<<<<<<<<<
 *         "Set value of this object with the value of another AnyPointer::Reader. Don't use this for structs"
 *         cdef _DynamicObjectReader reader = other
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_9set(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *__pyx_v_reader = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_9set)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1611
 *     cpdef set(self, other):
 *         "Set value of this object with the value of another AnyPointer::Reader. Don't use this for structs"
 *         cdef _DynamicObjectReader reader = other             # <<<<<<<<<<<<<<
 *         self.thisptr.set(reader.thisptr)
 * 
 */
  if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader))))) __PYX_ERR(0, 1611, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_other;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_reader = ((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1612
 *         "Set value of this object with the value of another AnyPointer::Reader. Don't use this for structs"
 *         cdef _DynamicObjectReader reader = other
 *         self.thisptr.set(reader.thisptr)             # <<<<<<<<<<<<<<
 * 
 *     cpdef set_as_text(self, text):
 */
  try {
    __pyx_v_self->thisptr->set(__pyx_v_reader->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1612, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":1609
 *         return _DynamicListBuilder()._init(self.thisptr.getAsList(s.thisptr), self._parent)
 * 
 *     cpdef set(self, other):             # <<<<<<<<<<<<<<
 *         "Set value of this object with the value of another AnyPointer::Reader. Don't use this for structs"
 *         cdef _DynamicObjectReader reader = other
 */

  /* 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_AddTraceback("capnp.lib.capnp._DynamicObjectBuilder.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_9set(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_8set[] = "_DynamicObjectBuilder.set(self, other)\nSet value of this object with the value of another AnyPointer::Reader. Don't use this for structs";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_9set(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_8set(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_8set(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_set(__pyx_v_self, __pyx_v_other, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __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("capnp.lib.capnp._DynamicObjectBuilder.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1614
 *         self.thisptr.set(reader.thisptr)
 * 
 *     cpdef set_as_text(self, text):             # <<<<<<<<<<<<<<
 *         self.thisptr.setAsText(text)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_11set_as_text(PyObject *__pyx_v_self, PyObject *__pyx_v_text); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_set_as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_text, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_as_text", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_as_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1614, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_11set_as_text)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_text) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_text);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1614, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1615
 * 
 *     cpdef set_as_text(self, text):
 *         self.thisptr.setAsText(text)             # <<<<<<<<<<<<<<
 * 
 *     cpdef init_as_list(self, schema, size):
 */
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_text); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1615, __pyx_L1_error)
  try {
    __pyx_v_self->thisptr->setAs< ::capnp::Text>(__pyx_t_5);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1615, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":1614
 *         self.thisptr.set(reader.thisptr)
 * 
 *     cpdef set_as_text(self, text):             # <<<<<<<<<<<<<<
 *         self.thisptr.setAsText(text)
 * 
 */

  /* 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_AddTraceback("capnp.lib.capnp._DynamicObjectBuilder.set_as_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_11set_as_text(PyObject *__pyx_v_self, PyObject *__pyx_v_text); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_10set_as_text[] = "_DynamicObjectBuilder.set_as_text(self, text)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_11set_as_text(PyObject *__pyx_v_self, PyObject *__pyx_v_text) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_as_text (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_10set_as_text(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_text));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_10set_as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_text) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_as_text", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_set_as_text(__pyx_v_self, __pyx_v_text, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1614, __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("capnp.lib.capnp._DynamicObjectBuilder.set_as_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1617
 *         self.thisptr.setAsText(text)
 * 
 *     cpdef init_as_list(self, schema, size):             # <<<<<<<<<<<<<<
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_13init_as_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_init_as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_size, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_9;
   ::capnp::DynamicList::Builder __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_as_list", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_as_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_13init_as_list)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_schema, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_schema, __pyx_v_size};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1617, __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(__pyx_v_schema);
          __Pyx_GIVEREF(__pyx_v_schema);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_schema);
          __Pyx_INCREF(__pyx_v_size);
          __Pyx_GIVEREF(__pyx_v_size);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_size);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1619
 *     cpdef init_as_list(self, schema, size):
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_7 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1619, __pyx_L1_error)
  __pyx_t_8 = (__pyx_t_7 != 0);
  if (__pyx_t_8) {

    /* "capnp/lib/capnp.pyx":1620
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__ListSchema))))) __PYX_ERR(0, 1620, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1619
 *     cpdef init_as_list(self, schema, size):
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":1622
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         return _DynamicListBuilder()._init(self.thisptr.initAsList(s.thisptr, size), self._parent)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__ListSchema))))) __PYX_ERR(0, 1622, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":1624
 *             s = schema
 * 
 *         return _DynamicListBuilder()._init(self.thisptr.initAsList(s.thisptr, size), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_text(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyInt_As_unsigned_int(__pyx_v_size); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1624, __pyx_L1_error)
  try {
    __pyx_t_10 = __pyx_v_self->thisptr->initAs< ::capnp::DynamicList>(__pyx_v_s->thisptr, __pyx_t_9);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1624, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)__pyx_t_1), __pyx_t_10, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1617
 *         self.thisptr.setAsText(text)
 * 
 *     cpdef init_as_list(self, schema, size):             # <<<<<<<<<<<<<<
 *         cdef _ListSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicObjectBuilder.init_as_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_13init_as_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_12init_as_list[] = "_DynamicObjectBuilder.init_as_list(self, schema, size)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_13init_as_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init_as_list (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_schema,&__pyx_n_s_size,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("init_as_list", 1, 2, 2, 1); __PYX_ERR(0, 1617, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init_as_list") < 0)) __PYX_ERR(0, 1617, __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_schema = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("init_as_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1617, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicObjectBuilder.init_as_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_12init_as_list(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self), __pyx_v_schema, __pyx_v_size);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_12init_as_list(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_size) {
  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("init_as_list", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_init_as_list(__pyx_v_self, __pyx_v_schema, __pyx_v_size, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __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("capnp.lib.capnp._DynamicObjectBuilder.init_as_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1626
 *         return _DynamicListBuilder()._init(self.thisptr.initAsList(s.thisptr, size), self._parent)
 * 
 *     cpdef as_text(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return (<char*>self.thisptr.getAsText().cStr())[:]
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_15as_text(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::kj::StringPtr __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_text", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_15as_text)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1627
 * 
 *     cpdef as_text(self) except +reraise_kj_exception:
 *         return (<char*>self.thisptr.getAsText().cStr())[:]             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_reader(self):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->getAs< ::capnp::Text>();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1627, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyStr_FromString(((char *)__pyx_t_5.cStr()) + 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1626
 *         return _DynamicListBuilder()._init(self.thisptr.initAsList(s.thisptr, size), self._parent)
 * 
 *     cpdef as_text(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return (<char*>self.thisptr.getAsText().cStr())[:]
 * 
 */

  /* 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("capnp.lib.capnp._DynamicObjectBuilder.as_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_15as_text(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_14as_text[] = "_DynamicObjectBuilder.as_text(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_15as_text(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_text (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_14as_text(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_14as_text(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__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("as_text", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_text(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1626, __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("capnp.lib.capnp._DynamicObjectBuilder.as_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1629
 *         return (<char*>self.thisptr.getAsText().cStr())[:]
 * 
 *     cpdef as_reader(self):             # <<<<<<<<<<<<<<
 *         return _DynamicObjectReader()._init(self.thisptr.asReader(), self._parent)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_17as_reader(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::AnyPointer::Reader __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_reader", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_reader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_17as_reader)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1629, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1630
 * 
 *     cpdef as_reader(self):
 *         return _DynamicObjectReader()._init(self.thisptr.asReader(), self._parent)             # <<<<<<<<<<<<<<
 * 
 * cdef class _EventLoop:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr->asReader();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1630, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_t_1), __pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1629
 *         return (<char*>self.thisptr.getAsText().cStr())[:]
 * 
 *     cpdef as_reader(self):             # <<<<<<<<<<<<<<
 *         return _DynamicObjectReader()._init(self.thisptr.asReader(), self._parent)
 * 
 */

  /* 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("capnp.lib.capnp._DynamicObjectBuilder.as_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_17as_reader(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_16as_reader[] = "_DynamicObjectBuilder.as_reader(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_17as_reader(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_reader (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_16as_reader(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_16as_reader(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__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("as_reader", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_reader(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __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("capnp.lib.capnp._DynamicObjectBuilder.as_reader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1572
 * cdef class _DynamicObjectBuilder:
 *     cdef C_DynamicObject.Builder * thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, C_DynamicObject.Builder other, object parent):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_18__reduce_cython__[] = "_DynamicObjectBuilder.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_18__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicObjectBuilder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_20__setstate_cython__[] = "_DynamicObjectBuilder.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_20__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_DynamicObjectBuilder_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicObjectBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1635
 *     cdef capnp.AsyncIoContext * thisptr
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._init()
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_10_EventLoop_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_10_EventLoop_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_10_EventLoop___init__(((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_10_EventLoop___init__(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":1636
 * 
 *     def __init__(self):
 *         self._init()             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self) except +reraise_kj_exception:
 */
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__EventLoop *)__pyx_v_self->__pyx_vtab)->_init(__pyx_v_self);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1636, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1636, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1635
 *     cdef capnp.AsyncIoContext * thisptr
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._init()
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._EventLoop.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1638
 *         self._init()
 * 
 *     cdef _init(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         self.thisptr = new capnp.AsyncIoContext(capnp.setupAsyncIo())
 * 
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_10_EventLoop__init(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":1639
 * 
 *     cdef _init(self) except +reraise_kj_exception:
 *         self.thisptr = new capnp.AsyncIoContext(capnp.setupAsyncIo())             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->thisptr = new  ::kj::AsyncIoContext( ::kj::setupAsyncIo());

  /* "capnp/lib/capnp.pyx":1638
 *         self._init()
 * 
 *     cdef _init(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         self.thisptr = new capnp.AsyncIoContext(capnp.setupAsyncIo())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1641
 *         self.thisptr = new capnp.AsyncIoContext(capnp.setupAsyncIo())
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr #TODO:MEMORY: fix problems with Promises still being around
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_10_EventLoop_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_10_EventLoop_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_10_EventLoop_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_10_EventLoop_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":1642
 * 
 *     def __dealloc__(self):
 *         del self.thisptr #TODO:MEMORY: fix problems with Promises still being around             # <<<<<<<<<<<<<<
 * 
 *     cpdef _remove(self) except +reraise_kj_exception:
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1641
 *         self.thisptr = new capnp.AsyncIoContext(capnp.setupAsyncIo())
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr #TODO:MEMORY: fix problems with Promises still being around
 * 
 */

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

/* "capnp/lib/capnp.pyx":1644
 *         del self.thisptr #TODO:MEMORY: fix problems with Promises still being around
 * 
 *     cpdef _remove(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         self.thisptr = NULL
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_5_remove(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_10_EventLoop__remove(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_5_remove)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1644, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1645
 * 
 *     cpdef _remove(self) except +reraise_kj_exception:
 *         del self.thisptr             # <<<<<<<<<<<<<<
 *         self.thisptr = NULL
 * 
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1646
 *     cpdef _remove(self) except +reraise_kj_exception:
 *         del self.thisptr
 *         self.thisptr = NULL             # <<<<<<<<<<<<<<
 * 
 *     cdef TwoWayPipe makeTwoWayPipe(self):
 */
  __pyx_v_self->thisptr = NULL;

  /* "capnp/lib/capnp.pyx":1644
 *         del self.thisptr #TODO:MEMORY: fix problems with Promises still being around
 * 
 *     cpdef _remove(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         self.thisptr = NULL
 */

  /* 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_AddTraceback("capnp.lib.capnp._EventLoop._remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_5_remove(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_10_EventLoop_4_remove[] = "_EventLoop._remove(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_5_remove(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_remove (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_10_EventLoop_4_remove(((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_10_EventLoop_4_remove(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__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("_remove", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_10_EventLoop__remove(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1644, __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("capnp.lib.capnp._EventLoop._remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1648
 *         self.thisptr = NULL
 * 
 *     cdef TwoWayPipe makeTwoWayPipe(self):             # <<<<<<<<<<<<<<
 *         return deref(deref(self.thisptr).provider).newTwoWayPipe()
 * 
 */

static  ::kj::TwoWayPipe __pyx_f_5capnp_3lib_5capnp_10_EventLoop_makeTwoWayPipe(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self) {
   ::kj::TwoWayPipe __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("makeTwoWayPipe", 0);

  /* "capnp/lib/capnp.pyx":1649
 * 
 *     cdef TwoWayPipe makeTwoWayPipe(self):
 *         return deref(deref(self.thisptr).provider).newTwoWayPipe()             # <<<<<<<<<<<<<<
 * 
 *     cdef Own[AsyncIoStream] wrapSocketFd(self, int fd):
 */
  __pyx_r = (*(*__pyx_v_self->thisptr).provider).newTwoWayPipe();
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1648
 *         self.thisptr = NULL
 * 
 *     cdef TwoWayPipe makeTwoWayPipe(self):             # <<<<<<<<<<<<<<
 *         return deref(deref(self.thisptr).provider).newTwoWayPipe()
 * 
 */

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

/* "capnp/lib/capnp.pyx":1651
 *         return deref(deref(self.thisptr).provider).newTwoWayPipe()
 * 
 *     cdef Own[AsyncIoStream] wrapSocketFd(self, int fd):             # <<<<<<<<<<<<<<
 *         return deref(deref(self.thisptr).lowLevelProvider).wrapSocketFd(fd)
 * 
 */

static  ::kj::Own< ::kj::AsyncIoStream>  __pyx_f_5capnp_3lib_5capnp_10_EventLoop_wrapSocketFd(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self, int __pyx_v_fd) {
   ::kj::Own< ::kj::AsyncIoStream>  __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrapSocketFd", 0);

  /* "capnp/lib/capnp.pyx":1652
 * 
 *     cdef Own[AsyncIoStream] wrapSocketFd(self, int fd):
 *         return deref(deref(self.thisptr).lowLevelProvider).wrapSocketFd(fd)             # <<<<<<<<<<<<<<
 * 
 * cdef _EventLoop C_DEFAULT_EVENT_LOOP
 */
  __pyx_r = (*(*__pyx_v_self->thisptr).lowLevelProvider).wrapSocketFd(__pyx_v_fd);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1651
 *         return deref(deref(self.thisptr).provider).newTwoWayPipe()
 * 
 *     cdef Own[AsyncIoStream] wrapSocketFd(self, int fd):             # <<<<<<<<<<<<<<
 *         return deref(deref(self.thisptr).lowLevelProvider).wrapSocketFd(fd)
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_10_EventLoop_6__reduce_cython__[] = "_EventLoop.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_10_EventLoop_6__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_10_EventLoop_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._EventLoop.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_10_EventLoop_8__setstate_cython__[] = "_EventLoop.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_10_EventLoop_8__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_10_EventLoop_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._EventLoop.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1659
 * _THREAD_LOCAL_EVENT_LOOPS = []
 * 
 * cdef _EventLoop C_DEFAULT_EVENT_LOOP_GETTER():             # <<<<<<<<<<<<<<
 *     'Optimization for not having to deal with threadlocal event loops unless we need to'
 *     global C_DEFAULT_EVENT_LOOP
 */

static struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER(void) {
  PyObject *__pyx_v_loop = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("C_DEFAULT_EVENT_LOOP_GETTER", 0);

  /* "capnp/lib/capnp.pyx":1662
 *     'Optimization for not having to deal with threadlocal event loops unless we need to'
 *     global C_DEFAULT_EVENT_LOOP
 *     if C_DEFAULT_EVENT_LOOP is not None:             # <<<<<<<<<<<<<<
 *         return C_DEFAULT_EVENT_LOOP
 *     elif _C_DEFAULT_EVENT_LOOP_LOCAL is not None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":1663
 *     global C_DEFAULT_EVENT_LOOP
 *     if C_DEFAULT_EVENT_LOOP is not None:
 *         return C_DEFAULT_EVENT_LOOP             # <<<<<<<<<<<<<<
 *     elif _C_DEFAULT_EVENT_LOOP_LOCAL is not None:
 *         loop = getattr(_C_DEFAULT_EVENT_LOOP_LOCAL, 'loop', None)
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP));
    __pyx_r = __pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":1662
 *     'Optimization for not having to deal with threadlocal event loops unless we need to'
 *     global C_DEFAULT_EVENT_LOOP
 *     if C_DEFAULT_EVENT_LOOP is not None:             # <<<<<<<<<<<<<<
 *         return C_DEFAULT_EVENT_LOOP
 *     elif _C_DEFAULT_EVENT_LOOP_LOCAL is not None:
 */
  }

  /* "capnp/lib/capnp.pyx":1664
 *     if C_DEFAULT_EVENT_LOOP is not None:
 *         return C_DEFAULT_EVENT_LOOP
 *     elif _C_DEFAULT_EVENT_LOOP_LOCAL is not None:             # <<<<<<<<<<<<<<
 *         loop = getattr(_C_DEFAULT_EVENT_LOOP_LOCAL, 'loop', None)
 *         if loop is not None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":1665
 *         return C_DEFAULT_EVENT_LOOP
 *     elif _C_DEFAULT_EVENT_LOOP_LOCAL is not None:
 *         loop = getattr(_C_DEFAULT_EVENT_LOOP_LOCAL, 'loop', None)             # <<<<<<<<<<<<<<
 *         if loop is not None:
 *             return <_EventLoop>_C_DEFAULT_EVENT_LOOP_LOCAL.loop
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_GetAttr3(__pyx_t_3, __pyx_n_s_loop, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_loop = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":1666
 *     elif _C_DEFAULT_EVENT_LOOP_LOCAL is not None:
 *         loop = getattr(_C_DEFAULT_EVENT_LOOP_LOCAL, 'loop', None)
 *         if loop is not None:             # <<<<<<<<<<<<<<
 *             return <_EventLoop>_C_DEFAULT_EVENT_LOOP_LOCAL.loop
 *         else:
 */
    __pyx_t_1 = (__pyx_v_loop != Py_None);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "capnp/lib/capnp.pyx":1667
 *         loop = getattr(_C_DEFAULT_EVENT_LOOP_LOCAL, 'loop', None)
 *         if loop is not None:
 *             return <_EventLoop>_C_DEFAULT_EVENT_LOOP_LOCAL.loop             # <<<<<<<<<<<<<<
 *         else:
 *             _C_DEFAULT_EVENT_LOOP_LOCAL.loop = _EventLoop()
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_loop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_INCREF(((PyObject *)((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_3)));
      __pyx_r = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "capnp/lib/capnp.pyx":1666
 *     elif _C_DEFAULT_EVENT_LOOP_LOCAL is not None:
 *         loop = getattr(_C_DEFAULT_EVENT_LOOP_LOCAL, 'loop', None)
 *         if loop is not None:             # <<<<<<<<<<<<<<
 *             return <_EventLoop>_C_DEFAULT_EVENT_LOOP_LOCAL.loop
 *         else:
 */
    }

    /* "capnp/lib/capnp.pyx":1669
 *             return <_EventLoop>_C_DEFAULT_EVENT_LOOP_LOCAL.loop
 *         else:
 *             _C_DEFAULT_EVENT_LOOP_LOCAL.loop = _EventLoop()             # <<<<<<<<<<<<<<
 *             return _C_DEFAULT_EVENT_LOOP_LOCAL.loop
 *     else:
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__EventLoop)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_loop, __pyx_t_3) < 0) __PYX_ERR(0, 1669, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "capnp/lib/capnp.pyx":1670
 *         else:
 *             _C_DEFAULT_EVENT_LOOP_LOCAL.loop = _EventLoop()
 *             return _C_DEFAULT_EVENT_LOOP_LOCAL.loop             # <<<<<<<<<<<<<<
 *     else:
 *       C_DEFAULT_EVENT_LOOP = _EventLoop()
 */
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_loop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5capnp_3lib_5capnp__EventLoop))))) __PYX_ERR(0, 1670, __pyx_L1_error)
      __pyx_r = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_3);
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }

    /* "capnp/lib/capnp.pyx":1664
 *     if C_DEFAULT_EVENT_LOOP is not None:
 *         return C_DEFAULT_EVENT_LOOP
 *     elif _C_DEFAULT_EVENT_LOOP_LOCAL is not None:             # <<<<<<<<<<<<<<
 *         loop = getattr(_C_DEFAULT_EVENT_LOOP_LOCAL, 'loop', None)
 *         if loop is not None:
 */
  }

  /* "capnp/lib/capnp.pyx":1672
 *             return _C_DEFAULT_EVENT_LOOP_LOCAL.loop
 *     else:
 *       C_DEFAULT_EVENT_LOOP = _EventLoop()             # <<<<<<<<<<<<<<
 *       return C_DEFAULT_EVENT_LOOP
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__EventLoop)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP));
    __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP, ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_3));
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":1673
 *     else:
 *       C_DEFAULT_EVENT_LOOP = _EventLoop()
 *       return C_DEFAULT_EVENT_LOOP             # <<<<<<<<<<<<<<
 * 
 * cdef class _Timer:
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __Pyx_INCREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP));
    __pyx_r = __pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP;
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":1659
 * _THREAD_LOCAL_EVENT_LOOPS = []
 * 
 * cdef _EventLoop C_DEFAULT_EVENT_LOOP_GETTER():             # <<<<<<<<<<<<<<
 *     'Optimization for not having to deal with threadlocal event loops unless we need to'
 *     global C_DEFAULT_EVENT_LOOP
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp.C_DEFAULT_EVENT_LOOP_GETTER", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loop);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1678
 *     cdef capnp.Timer * thisptr
 * 
 *     cdef _init(self, capnp.Timer * timer):             # <<<<<<<<<<<<<<
 *         self.thisptr = timer
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_6_Timer__init(struct __pyx_obj_5capnp_3lib_5capnp__Timer *__pyx_v_self,  ::kj::Timer *__pyx_v_timer) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":1679
 * 
 *     cdef _init(self, capnp.Timer * timer):
 *         self.thisptr = timer             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = __pyx_v_timer;

  /* "capnp/lib/capnp.pyx":1680
 *     cdef _init(self, capnp.Timer * timer):
 *         self.thisptr = timer
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef after_delay(self, time) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1678
 *     cdef capnp.Timer * thisptr
 * 
 *     cdef _init(self, capnp.Timer * timer):             # <<<<<<<<<<<<<<
 *         self.thisptr = timer
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":1682
 *         return self
 * 
 *     cpdef after_delay(self, time) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _VoidPromise()._init(self.thisptr.afterDelay(capnp.Nanoseconds(time)))
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_6_Timer_1after_delay(PyObject *__pyx_v_self, PyObject *__pyx_v_time); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_6_Timer_after_delay(struct __pyx_obj_5capnp_3lib_5capnp__Timer *__pyx_v_self, PyObject *__pyx_v_time, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int64_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("after_delay", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_after_delay); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_6_Timer_1after_delay)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_time) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_time);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1683
 * 
 *     cpdef after_delay(self, time) except +reraise_kj_exception:
 *         return _VoidPromise()._init(self.thisptr.afterDelay(capnp.Nanoseconds(time)))             # <<<<<<<<<<<<<<
 * 
 * def getTimer():
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__VoidPromise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_v_time); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1683, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise *)((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1), __pyx_v_self->thisptr->afterDelay(__pyx_f_5capnp_8includes_9capnp_cpp_Nanoseconds(__pyx_t_5)), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1683, __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;

  /* "capnp/lib/capnp.pyx":1682
 *         return self
 * 
 *     cpdef after_delay(self, time) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _VoidPromise()._init(self.thisptr.afterDelay(capnp.Nanoseconds(time)))
 * 
 */

  /* 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("capnp.lib.capnp._Timer.after_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_6_Timer_1after_delay(PyObject *__pyx_v_self, PyObject *__pyx_v_time); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_6_Timer_after_delay[] = "_Timer.after_delay(self, time)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_6_Timer_1after_delay(PyObject *__pyx_v_self, PyObject *__pyx_v_time) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("after_delay (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_6_Timer_after_delay(((struct __pyx_obj_5capnp_3lib_5capnp__Timer *)__pyx_v_self), ((PyObject *)__pyx_v_time));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_6_Timer_after_delay(struct __pyx_obj_5capnp_3lib_5capnp__Timer *__pyx_v_self, PyObject *__pyx_v_time) {
  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("after_delay", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_6_Timer_after_delay(__pyx_v_self, __pyx_v_time, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1682, __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("capnp.lib.capnp._Timer.after_delay", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_6_Timer_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_6_Timer_2__reduce_cython__[] = "_Timer.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_6_Timer_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_6_Timer_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__Timer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_6_Timer_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Timer *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._Timer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_6_Timer_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_6_Timer_4__setstate_cython__[] = "_Timer.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_6_Timer_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_6_Timer_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__Timer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_6_Timer_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Timer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._Timer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1685
 *         return _VoidPromise()._init(self.thisptr.afterDelay(capnp.Nanoseconds(time)))
 * 
 * def getTimer():             # <<<<<<<<<<<<<<
 *     """
 *     Get libcapnp event loop timer
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_9getTimer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_8getTimer[] = "getTimer()\n\n    Get libcapnp event loop timer\n    ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_9getTimer = {"getTimer", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_9getTimer, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_8getTimer};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_9getTimer(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTimer (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8getTimer(__pyx_self);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8getTimer(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
   ::kj::Timer *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getTimer", 0);

  /* "capnp/lib/capnp.pyx":1689
 *     Get libcapnp event loop timer
 *     """
 *     return _Timer()._init(helpers.getTimer(C_DEFAULT_EVENT_LOOP_GETTER().thisptr))             # <<<<<<<<<<<<<<
 * 
 * cpdef remove_event_loop(ignore_errors=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Timer)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  try {
    __pyx_t_3 = getTimer(((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_2)->thisptr);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1689, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Timer *)((struct __pyx_obj_5capnp_3lib_5capnp__Timer *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Timer *)__pyx_t_1), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1689, __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;

  /* "capnp/lib/capnp.pyx":1685
 *         return _VoidPromise()._init(self.thisptr.afterDelay(capnp.Nanoseconds(time)))
 * 
 * def getTimer():             # <<<<<<<<<<<<<<
 *     """
 *     Get libcapnp event loop timer
 */

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

/* "capnp/lib/capnp.pyx":1691
 *     return _Timer()._init(helpers.getTimer(C_DEFAULT_EVENT_LOOP_GETTER().thisptr))
 * 
 * cpdef remove_event_loop(ignore_errors=False):             # <<<<<<<<<<<<<<
 *     '''Remove the global event loop'''
 *     global C_DEFAULT_EVENT_LOOP
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_11remove_event_loop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_remove_event_loop(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_remove_event_loop *__pyx_optional_args) {
  PyObject *__pyx_v_ignore_errors = ((PyObject *)Py_False);
  PyObject *__pyx_v_loop = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove_event_loop", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ignore_errors = __pyx_optional_args->ignore_errors;
    }
  }

  /* "capnp/lib/capnp.pyx":1697
 *     global _C_DEFAULT_EVENT_LOOP_LOCAL
 * 
 *     if C_DEFAULT_EVENT_LOOP:             # <<<<<<<<<<<<<<
 *         try:
 *             C_DEFAULT_EVENT_LOOP._remove()
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1697, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":1698
 * 
 *     if C_DEFAULT_EVENT_LOOP:
 *         try:             # <<<<<<<<<<<<<<
 *             C_DEFAULT_EVENT_LOOP._remove()
 *         except:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      /*try:*/ {

        /* "capnp/lib/capnp.pyx":1699
 *     if C_DEFAULT_EVENT_LOOP:
 *         try:
 *             C_DEFAULT_EVENT_LOOP._remove()             # <<<<<<<<<<<<<<
 *         except:
 *             if not ignore_errors:
 */
        try {
          __pyx_t_5 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__EventLoop *)__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP->__pyx_vtab)->_remove(__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP, 0);
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1699, __pyx_L4_error)
        } catch(...) {
          reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
          __PYX_ERR(0, 1699, __pyx_L4_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "capnp/lib/capnp.pyx":1698
 * 
 *     if C_DEFAULT_EVENT_LOOP:
 *         try:             # <<<<<<<<<<<<<<
 *             C_DEFAULT_EVENT_LOOP._remove()
 *         except:
 */
      }
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "capnp/lib/capnp.pyx":1700
 *         try:
 *             C_DEFAULT_EVENT_LOOP._remove()
 *         except:             # <<<<<<<<<<<<<<
 *             if not ignore_errors:
 *                 raise
 */
      /*except:*/ {
        __Pyx_AddTraceback("capnp.lib.capnp.remove_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1700, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_7);

        /* "capnp/lib/capnp.pyx":1701
 *             C_DEFAULT_EVENT_LOOP._remove()
 *         except:
 *             if not ignore_errors:             # <<<<<<<<<<<<<<
 *                 raise
 *         C_DEFAULT_EVENT_LOOP = None
 */
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_errors); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1701, __pyx_L6_except_error)
        __pyx_t_8 = ((!__pyx_t_1) != 0);
        if (unlikely(__pyx_t_8)) {

          /* "capnp/lib/capnp.pyx":1702
 *         except:
 *             if not ignore_errors:
 *                 raise             # <<<<<<<<<<<<<<
 *         C_DEFAULT_EVENT_LOOP = None
 *     if len(_THREAD_LOCAL_EVENT_LOOPS) > 0:
 */
          __Pyx_GIVEREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_6);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_6, __pyx_t_7);
          __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; 
          __PYX_ERR(0, 1702, __pyx_L6_except_error)

          /* "capnp/lib/capnp.pyx":1701
 *             C_DEFAULT_EVENT_LOOP._remove()
 *         except:
 *             if not ignore_errors:             # <<<<<<<<<<<<<<
 *                 raise
 *         C_DEFAULT_EVENT_LOOP = None
 */
        }
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L5_exception_handled;
      }
      __pyx_L6_except_error:;

      /* "capnp/lib/capnp.pyx":1698
 * 
 *     if C_DEFAULT_EVENT_LOOP:
 *         try:             # <<<<<<<<<<<<<<
 *             C_DEFAULT_EVENT_LOOP._remove()
 *         except:
 */
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
      __pyx_L9_try_end:;
    }

    /* "capnp/lib/capnp.pyx":1703
 *             if not ignore_errors:
 *                 raise
 *         C_DEFAULT_EVENT_LOOP = None             # <<<<<<<<<<<<<<
 *     if len(_THREAD_LOCAL_EVENT_LOOPS) > 0:
 *         for loop in _THREAD_LOCAL_EVENT_LOOPS:
 */
    __Pyx_INCREF(Py_None);
    __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP));
    __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP, ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None));
    __Pyx_GIVEREF(Py_None);

    /* "capnp/lib/capnp.pyx":1697
 *     global _C_DEFAULT_EVENT_LOOP_LOCAL
 * 
 *     if C_DEFAULT_EVENT_LOOP:             # <<<<<<<<<<<<<<
 *         try:
 *             C_DEFAULT_EVENT_LOOP._remove()
 */
  }

  /* "capnp/lib/capnp.pyx":1704
 *                 raise
 *         C_DEFAULT_EVENT_LOOP = None
 *     if len(_THREAD_LOCAL_EVENT_LOOPS) > 0:             # <<<<<<<<<<<<<<
 *         for loop in _THREAD_LOCAL_EVENT_LOOPS:
 *             try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_THREAD_LOCAL_EVENT_LOOPS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1704, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_8 = ((__pyx_t_9 > 0) != 0);
  if (__pyx_t_8) {

    /* "capnp/lib/capnp.pyx":1705
 *         C_DEFAULT_EVENT_LOOP = None
 *     if len(_THREAD_LOCAL_EVENT_LOOPS) > 0:
 *         for loop in _THREAD_LOCAL_EVENT_LOOPS:             # <<<<<<<<<<<<<<
 *             try:
 *                 loop._remove()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_THREAD_LOCAL_EVENT_LOOPS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1705, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
      __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1705, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1705, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1705, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1705, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1705, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_10(__pyx_t_6);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1705, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_loop, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":1706
 *     if len(_THREAD_LOCAL_EVENT_LOOPS) > 0:
 *         for loop in _THREAD_LOCAL_EVENT_LOOPS:
 *             try:             # <<<<<<<<<<<<<<
 *                 loop._remove()
 *             except:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_2);
        /*try:*/ {

          /* "capnp/lib/capnp.pyx":1707
 *         for loop in _THREAD_LOCAL_EVENT_LOOPS:
 *             try:
 *                 loop._remove()             # <<<<<<<<<<<<<<
 *             except:
 *                 if not ignore_errors:
 */
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_loop, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1707, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_11 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          __pyx_t_7 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1707, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "capnp/lib/capnp.pyx":1706
 *     if len(_THREAD_LOCAL_EVENT_LOOPS) > 0:
 *         for loop in _THREAD_LOCAL_EVENT_LOOPS:
 *             try:             # <<<<<<<<<<<<<<
 *                 loop._remove()
 *             except:
 */
        }
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L23_try_end;
        __pyx_L16_error:;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "capnp/lib/capnp.pyx":1708
 *             try:
 *                 loop._remove()
 *             except:             # <<<<<<<<<<<<<<
 *                 if not ignore_errors:
 *                     raise
 */
        /*except:*/ {
          __Pyx_AddTraceback("capnp.lib.capnp.remove_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_11) < 0) __PYX_ERR(0, 1708, __pyx_L18_except_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GOTREF(__pyx_t_11);

          /* "capnp/lib/capnp.pyx":1709
 *                 loop._remove()
 *             except:
 *                 if not ignore_errors:             # <<<<<<<<<<<<<<
 *                     raise
 *         _THREAD_LOCAL_EVENT_LOOPS = []
 */
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_errors); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1709, __pyx_L18_except_error)
          __pyx_t_1 = ((!__pyx_t_8) != 0);
          if (unlikely(__pyx_t_1)) {

            /* "capnp/lib/capnp.pyx":1710
 *             except:
 *                 if not ignore_errors:
 *                     raise             # <<<<<<<<<<<<<<
 *         _THREAD_LOCAL_EVENT_LOOPS = []
 *         _C_DEFAULT_EVENT_LOOP_LOCAL = None
 */
            __Pyx_GIVEREF(__pyx_t_7);
            __Pyx_GIVEREF(__pyx_t_5);
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_5, __pyx_t_11);
            __pyx_t_7 = 0; __pyx_t_5 = 0; __pyx_t_11 = 0; 
            __PYX_ERR(0, 1710, __pyx_L18_except_error)

            /* "capnp/lib/capnp.pyx":1709
 *                 loop._remove()
 *             except:
 *                 if not ignore_errors:             # <<<<<<<<<<<<<<
 *                     raise
 *         _THREAD_LOCAL_EVENT_LOOPS = []
 */
          }
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          goto __pyx_L17_exception_handled;
        }
        __pyx_L18_except_error:;

        /* "capnp/lib/capnp.pyx":1706
 *     if len(_THREAD_LOCAL_EVENT_LOOPS) > 0:
 *         for loop in _THREAD_LOCAL_EVENT_LOOPS:
 *             try:             # <<<<<<<<<<<<<<
 *                 loop._remove()
 *             except:
 */
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
        goto __pyx_L1_error;
        __pyx_L17_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
        __pyx_L23_try_end:;
      }

      /* "capnp/lib/capnp.pyx":1705
 *         C_DEFAULT_EVENT_LOOP = None
 *     if len(_THREAD_LOCAL_EVENT_LOOPS) > 0:
 *         for loop in _THREAD_LOCAL_EVENT_LOOPS:             # <<<<<<<<<<<<<<
 *             try:
 *                 loop._remove()
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "capnp/lib/capnp.pyx":1711
 *                 if not ignore_errors:
 *                     raise
 *         _THREAD_LOCAL_EVENT_LOOPS = []             # <<<<<<<<<<<<<<
 *         _C_DEFAULT_EVENT_LOOP_LOCAL = None
 * 
 */
    __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_THREAD_LOCAL_EVENT_LOOPS, __pyx_t_6) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "capnp/lib/capnp.pyx":1712
 *                     raise
 *         _THREAD_LOCAL_EVENT_LOOPS = []
 *         _C_DEFAULT_EVENT_LOOP_LOCAL = None             # <<<<<<<<<<<<<<
 * 
 * cpdef create_event_loop(threaded=True):
 */
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL, Py_None) < 0) __PYX_ERR(0, 1712, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1704
 *                 raise
 *         C_DEFAULT_EVENT_LOOP = None
 *     if len(_THREAD_LOCAL_EVENT_LOOPS) > 0:             # <<<<<<<<<<<<<<
 *         for loop in _THREAD_LOCAL_EVENT_LOOPS:
 *             try:
 */
  }

  /* "capnp/lib/capnp.pyx":1691
 *     return _Timer()._init(helpers.getTimer(C_DEFAULT_EVENT_LOOP_GETTER().thisptr))
 * 
 * cpdef remove_event_loop(ignore_errors=False):             # <<<<<<<<<<<<<<
 *     '''Remove the global event loop'''
 *     global C_DEFAULT_EVENT_LOOP
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp.remove_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_loop);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11remove_event_loop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_10remove_event_loop[] = "remove_event_loop(ignore_errors=False)\nRemove the global event loop";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11remove_event_loop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ignore_errors = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove_event_loop (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ignore_errors,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_False);
    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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ignore_errors);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "remove_event_loop") < 0)) __PYX_ERR(0, 1691, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ignore_errors = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("remove_event_loop", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1691, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.remove_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_10remove_event_loop(__pyx_self, __pyx_v_ignore_errors);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_10remove_event_loop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ignore_errors) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_remove_event_loop __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove_event_loop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.ignore_errors = __pyx_v_ignore_errors;
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_remove_event_loop(0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __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("capnp.lib.capnp.remove_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1714
 *         _C_DEFAULT_EVENT_LOOP_LOCAL = None
 * 
 * cpdef create_event_loop(threaded=True):             # <<<<<<<<<<<<<<
 *     '''Create a new global event loop. This will not remove the previous
 *     EventLoop for you, so make sure to do that first'''
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_13create_event_loop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_create_event_loop(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_create_event_loop *__pyx_optional_args) {
  PyObject *__pyx_v_threaded = ((PyObject *)Py_True);
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_loop = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_event_loop", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_threaded = __pyx_optional_args->threaded;
    }
  }

  /* "capnp/lib/capnp.pyx":1719
 *     global C_DEFAULT_EVENT_LOOP
 *     global _C_DEFAULT_EVENT_LOOP_LOCAL
 *     if threaded:             # <<<<<<<<<<<<<<
 *         if _C_DEFAULT_EVENT_LOOP_LOCAL is None:
 *             _C_DEFAULT_EVENT_LOOP_LOCAL = _threading.local()
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_threaded); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1719, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":1720
 *     global _C_DEFAULT_EVENT_LOOP_LOCAL
 *     if threaded:
 *         if _C_DEFAULT_EVENT_LOOP_LOCAL is None:             # <<<<<<<<<<<<<<
 *             _C_DEFAULT_EVENT_LOOP_LOCAL = _threading.local()
 *         loop = _EventLoop()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__pyx_t_2 == Py_None);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = (__pyx_t_1 != 0);
    if (__pyx_t_3) {

      /* "capnp/lib/capnp.pyx":1721
 *     if threaded:
 *         if _C_DEFAULT_EVENT_LOOP_LOCAL is None:
 *             _C_DEFAULT_EVENT_LOOP_LOCAL = _threading.local()             # <<<<<<<<<<<<<<
 *         loop = _EventLoop()
 *         _C_DEFAULT_EVENT_LOOP_LOCAL.loop = loop
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_local); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL, __pyx_t_2) < 0) __PYX_ERR(0, 1721, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "capnp/lib/capnp.pyx":1720
 *     global _C_DEFAULT_EVENT_LOOP_LOCAL
 *     if threaded:
 *         if _C_DEFAULT_EVENT_LOOP_LOCAL is None:             # <<<<<<<<<<<<<<
 *             _C_DEFAULT_EVENT_LOOP_LOCAL = _threading.local()
 *         loop = _EventLoop()
 */
    }

    /* "capnp/lib/capnp.pyx":1722
 *         if _C_DEFAULT_EVENT_LOOP_LOCAL is None:
 *             _C_DEFAULT_EVENT_LOOP_LOCAL = _threading.local()
 *         loop = _EventLoop()             # <<<<<<<<<<<<<<
 *         _C_DEFAULT_EVENT_LOOP_LOCAL.loop = loop
 *         _THREAD_LOCAL_EVENT_LOOPS.append(loop)
 */
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__EventLoop)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":1723
 *             _C_DEFAULT_EVENT_LOOP_LOCAL = _threading.local()
 *         loop = _EventLoop()
 *         _C_DEFAULT_EVENT_LOOP_LOCAL.loop = loop             # <<<<<<<<<<<<<<
 *         _THREAD_LOCAL_EVENT_LOOPS.append(loop)
 *     else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_loop, ((PyObject *)__pyx_v_loop)) < 0) __PYX_ERR(0, 1723, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":1724
 *         loop = _EventLoop()
 *         _C_DEFAULT_EVENT_LOOP_LOCAL.loop = loop
 *         _THREAD_LOCAL_EVENT_LOOPS.append(loop)             # <<<<<<<<<<<<<<
 *     else:
 *         C_DEFAULT_EVENT_LOOP = _EventLoop()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_THREAD_LOCAL_EVENT_LOOPS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_Append(__pyx_t_2, ((PyObject *)__pyx_v_loop)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1724, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":1719
 *     global C_DEFAULT_EVENT_LOOP
 *     global _C_DEFAULT_EVENT_LOOP_LOCAL
 *     if threaded:             # <<<<<<<<<<<<<<
 *         if _C_DEFAULT_EVENT_LOOP_LOCAL is None:
 *             _C_DEFAULT_EVENT_LOOP_LOCAL = _threading.local()
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":1726
 *         _THREAD_LOCAL_EVENT_LOOPS.append(loop)
 *     else:
 *         C_DEFAULT_EVENT_LOOP = _EventLoop()             # <<<<<<<<<<<<<<
 * 
 * cpdef reset_event_loop(ignore_errors=False, threaded=True):
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__EventLoop)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1726, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP));
    __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP, ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_2));
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":1714
 *         _C_DEFAULT_EVENT_LOOP_LOCAL = None
 * 
 * cpdef create_event_loop(threaded=True):             # <<<<<<<<<<<<<<
 *     '''Create a new global event loop. This will not remove the previous
 *     EventLoop for you, so make sure to do that first'''
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp.create_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13create_event_loop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12create_event_loop[] = "create_event_loop(threaded=True)\nCreate a new global event loop. This will not remove the previous\n    EventLoop for you, so make sure to do that first";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13create_event_loop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_threaded = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_event_loop (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_threaded,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_True);
    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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threaded);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_event_loop") < 0)) __PYX_ERR(0, 1714, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_threaded = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_event_loop", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1714, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.create_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12create_event_loop(__pyx_self, __pyx_v_threaded);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12create_event_loop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_threaded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_create_event_loop __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_event_loop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.threaded = __pyx_v_threaded;
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_create_event_loop(0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1714, __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("capnp.lib.capnp.create_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1728
 *         C_DEFAULT_EVENT_LOOP = _EventLoop()
 * 
 * cpdef reset_event_loop(ignore_errors=False, threaded=True):             # <<<<<<<<<<<<<<
 *     '''Removes event loop, then creates a new one. See remove_event_loop and create_event_loop for more details.'''
 *     remove_event_loop(ignore_errors)
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_15reset_event_loop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_reset_event_loop(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_reset_event_loop *__pyx_optional_args) {
  PyObject *__pyx_v_ignore_errors = ((PyObject *)Py_False);
  PyObject *__pyx_v_threaded = ((PyObject *)Py_True);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_remove_event_loop __pyx_t_2;
  struct __pyx_opt_args_5capnp_3lib_5capnp_create_event_loop __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reset_event_loop", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ignore_errors = __pyx_optional_args->ignore_errors;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_threaded = __pyx_optional_args->threaded;
      }
    }
  }

  /* "capnp/lib/capnp.pyx":1730
 * cpdef reset_event_loop(ignore_errors=False, threaded=True):
 *     '''Removes event loop, then creates a new one. See remove_event_loop and create_event_loop for more details.'''
 *     remove_event_loop(ignore_errors)             # <<<<<<<<<<<<<<
 *     create_event_loop(threaded)
 * 
 */
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.ignore_errors = __pyx_v_ignore_errors;
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_remove_event_loop(0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1731
 *     '''Removes event loop, then creates a new one. See remove_event_loop and create_event_loop for more details.'''
 *     remove_event_loop(ignore_errors)
 *     create_event_loop(threaded)             # <<<<<<<<<<<<<<
 * 
 * def wait_forever():
 */
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.threaded = __pyx_v_threaded;
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_create_event_loop(0, &__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1728
 *         C_DEFAULT_EVENT_LOOP = _EventLoop()
 * 
 * cpdef reset_event_loop(ignore_errors=False, threaded=True):             # <<<<<<<<<<<<<<
 *     '''Removes event loop, then creates a new one. See remove_event_loop and create_event_loop for more details.'''
 *     remove_event_loop(ignore_errors)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.reset_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15reset_event_loop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14reset_event_loop[] = "reset_event_loop(ignore_errors=False, threaded=True)\nRemoves event loop, then creates a new one. See remove_event_loop and create_event_loop for more details.";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15reset_event_loop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ignore_errors = 0;
  PyObject *__pyx_v_threaded = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset_event_loop (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ignore_errors,&__pyx_n_s_threaded,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_False);
    values[1] = ((PyObject *)Py_True);
    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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ignore_errors);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threaded);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reset_event_loop") < 0)) __PYX_ERR(0, 1728, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ignore_errors = values[0];
    __pyx_v_threaded = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reset_event_loop", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1728, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.reset_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14reset_event_loop(__pyx_self, __pyx_v_ignore_errors, __pyx_v_threaded);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14reset_event_loop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ignore_errors, PyObject *__pyx_v_threaded) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_reset_event_loop __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reset_event_loop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.ignore_errors = __pyx_v_ignore_errors;
  __pyx_t_2.threaded = __pyx_v_threaded;
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_reset_event_loop(0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1728, __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("capnp.lib.capnp.reset_event_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1733
 *     create_event_loop(threaded)
 * 
 * def wait_forever():             # <<<<<<<<<<<<<<
 *     """
 *     Use libcapnp event loop to poll/wait forever
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17wait_forever(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16wait_forever[] = "wait_forever()\n\n    Use libcapnp event loop to poll/wait forever\n    ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_17wait_forever = {"wait_forever", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_17wait_forever, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_16wait_forever};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17wait_forever(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wait_forever (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16wait_forever(__pyx_self);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16wait_forever(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_loop = 0;
  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("wait_forever", 0);

  /* "capnp/lib/capnp.pyx":1737
 *     Use libcapnp event loop to poll/wait forever
 *     """
 *     cdef _EventLoop loop = C_DEFAULT_EVENT_LOOP_GETTER()             # <<<<<<<<<<<<<<
 *     helpers.waitNeverDone(deref(loop.thisptr).waitScope)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1738
 *     """
 *     cdef _EventLoop loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *     helpers.waitNeverDone(deref(loop.thisptr).waitScope)             # <<<<<<<<<<<<<<
 * 
 * def poll_once():
 */
  waitNeverDone((*__pyx_v_loop->thisptr).waitScope);

  /* "capnp/lib/capnp.pyx":1733
 *     create_event_loop(threaded)
 * 
 * def wait_forever():             # <<<<<<<<<<<<<<
 *     """
 *     Use libcapnp event loop to poll/wait forever
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.wait_forever", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1740
 *     helpers.waitNeverDone(deref(loop.thisptr).waitScope)
 * 
 * def poll_once():             # <<<<<<<<<<<<<<
 *     """
 *     Poll libcapnp event loop once
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19poll_once(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_18poll_once[] = "poll_once()\n\n    Poll libcapnp event loop once\n    ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_19poll_once = {"poll_once", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19poll_once, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_18poll_once};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19poll_once(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("poll_once (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18poll_once(__pyx_self);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18poll_once(CYTHON_UNUSED PyObject *__pyx_self) {
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_loop = 0;
  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("poll_once", 0);

  /* "capnp/lib/capnp.pyx":1744
 *     Poll libcapnp event loop once
 *     """
 *     cdef _EventLoop loop = C_DEFAULT_EVENT_LOOP_GETTER()             # <<<<<<<<<<<<<<
 *     helpers.pollWaitScope(deref(loop.thisptr).waitScope)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1745
 *     """
 *     cdef _EventLoop loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *     helpers.pollWaitScope(deref(loop.thisptr).waitScope)             # <<<<<<<<<<<<<<
 * 
 * cdef class _CallContext:
 */
  pollWaitScope((*__pyx_v_loop->thisptr).waitScope);

  /* "capnp/lib/capnp.pyx":1740
 *     helpers.waitNeverDone(deref(loop.thisptr).waitScope)
 * 
 * def poll_once():             # <<<<<<<<<<<<<<
 *     """
 *     Poll libcapnp event loop once
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.poll_once", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1750
 *     cdef CallContext * thisptr
 * 
 *     cdef _init(self, CallContext other):             # <<<<<<<<<<<<<<
 *         self.thisptr = new CallContext(moveCallContext(other))
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext__init(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self,  ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct> __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":1751
 * 
 *     cdef _init(self, CallContext other):
 *         self.thisptr = new CallContext(moveCallContext(other))             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = new  ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct>(std::move(__pyx_v_other));

  /* "capnp/lib/capnp.pyx":1752
 *     cdef _init(self, CallContext other):
 *         self.thisptr = new CallContext(moveCallContext(other))
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1750
 *     cdef CallContext * thisptr
 * 
 *     cdef _init(self, CallContext other):             # <<<<<<<<<<<<<<
 *         self.thisptr = new CallContext(moveCallContext(other))
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":1754
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_12_CallContext_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_12_CallContext_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_12_CallContext___dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_12_CallContext___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":1755
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     property params:
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1754
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":1758
 * 
 *     property params:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *            return _DynamicStructReader()._init(self.thisptr.getParams(), self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_6params_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_6params_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_CallContext_6params___get__(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_6params___get__(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
   ::capnp::DynamicStruct::Reader __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":1759
 *     property params:
 *         def __get__(self):
 *            return _DynamicStructReader()._init(self.thisptr.getParams(), self)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get_results(self, uint word_count=0):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_2 = __pyx_v_self->thisptr->getParams();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1759, __pyx_L1_error)
  }
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1), __pyx_t_2, ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1758
 * 
 *     property params:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *            return _DynamicStructReader()._init(self.thisptr.getParams(), self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._CallContext.params.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1761
 *            return _DynamicStructReader()._init(self.thisptr.getParams(), self)
 * 
 *     cpdef _get_results(self, uint word_count=0):             # <<<<<<<<<<<<<<
 *         return _DynamicStructBuilder()._init(self.thisptr.getResults(), self) # TODO: pass firstSegmentWordSize
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_3_get_results(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext__get_results(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_CallContext__get_results *__pyx_optional_args) {
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_word_count = ((__pyx_t_5capnp_8includes_5types_uint)0);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_results", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_word_count = __pyx_optional_args->word_count;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_3_get_results)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_word_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1761, __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_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1761, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1762
 * 
 *     cpdef _get_results(self, uint word_count=0):
 *         return _DynamicStructBuilder()._init(self.thisptr.getResults(), self) # TODO: pass firstSegmentWordSize             # <<<<<<<<<<<<<<
 * 
 *     property results:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_1), __pyx_v_self->thisptr->getResults(), ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1762, __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;

  /* "capnp/lib/capnp.pyx":1761
 *            return _DynamicStructReader()._init(self.thisptr.getParams(), self)
 * 
 *     cpdef _get_results(self, uint word_count=0):             # <<<<<<<<<<<<<<
 *         return _DynamicStructBuilder()._init(self.thisptr.getResults(), self) # TODO: pass firstSegmentWordSize
 * 
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._CallContext._get_results", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_3_get_results(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_CallContext_2_get_results[] = "_CallContext._get_results(self, uint word_count=0)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_3_get_results(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_word_count;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_results (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_word_count,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_word_count);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_results") < 0)) __PYX_ERR(0, 1761, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_word_count = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_word_count == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1761, __pyx_L3_error)
    } else {
      __pyx_v_word_count = ((__pyx_t_5capnp_8includes_5types_uint)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_results", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1761, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._CallContext._get_results", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_CallContext_2_get_results(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_v_self), __pyx_v_word_count);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_2_get_results(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, __pyx_t_5capnp_8includes_5types_uint __pyx_v_word_count) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_12_CallContext__get_results __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_results", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.word_count = __pyx_v_word_count;
  __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__CallContext->_get_results(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __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("capnp.lib.capnp._CallContext._get_results", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1765
 * 
 *     property results:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *            return self._get_results()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_7results_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_7results_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_CallContext_7results___get__(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_7results___get__(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":1766
 *     property results:
 *         def __get__(self):
 *            return self._get_results()             # <<<<<<<<<<<<<<
 * 
 *     cpdef release_params(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__CallContext *)__pyx_v_self->__pyx_vtab)->_get_results(__pyx_v_self, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1765
 * 
 *     property results:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *            return self._get_results()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._CallContext.results.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1768
 *            return self._get_results()
 * 
 *     cpdef release_params(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.releaseParams()
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_5release_params(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext_release_params(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("release_params", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_release_params); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_5release_params)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1768, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1769
 * 
 *     cpdef release_params(self):
 *         self.thisptr.releaseParams()             # <<<<<<<<<<<<<<
 * 
 *     cpdef allow_cancellation(self):
 */
  try {
    __pyx_v_self->thisptr->releaseParams();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1769, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":1768
 *            return self._get_results()
 * 
 *     cpdef release_params(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.releaseParams()
 * 
 */

  /* 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_AddTraceback("capnp.lib.capnp._CallContext.release_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_5release_params(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_CallContext_4release_params[] = "_CallContext.release_params(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_5release_params(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("release_params (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_CallContext_4release_params(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_4release_params(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__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("release_params", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_12_CallContext_release_params(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __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("capnp.lib.capnp._CallContext.release_params", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1771
 *         self.thisptr.releaseParams()
 * 
 *     cpdef allow_cancellation(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.allowCancellation()
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_7allow_cancellation(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext_allow_cancellation(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("allow_cancellation", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_allow_cancellation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_7allow_cancellation)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1772
 * 
 *     cpdef allow_cancellation(self):
 *         self.thisptr.allowCancellation()             # <<<<<<<<<<<<<<
 * 
 *     cpdef tail_call(self, _Request tailRequest):
 */
  try {
    __pyx_v_self->thisptr->allowCancellation();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1772, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":1771
 *         self.thisptr.releaseParams()
 * 
 *     cpdef allow_cancellation(self):             # <<<<<<<<<<<<<<
 *         self.thisptr.allowCancellation()
 * 
 */

  /* 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_AddTraceback("capnp.lib.capnp._CallContext.allow_cancellation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_7allow_cancellation(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_CallContext_6allow_cancellation[] = "_CallContext.allow_cancellation(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_7allow_cancellation(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("allow_cancellation (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_CallContext_6allow_cancellation(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_6allow_cancellation(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__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("allow_cancellation", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_12_CallContext_allow_cancellation(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1771, __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("capnp.lib.capnp._CallContext.allow_cancellation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1774
 *         self.thisptr.allowCancellation()
 * 
 *     cpdef tail_call(self, _Request tailRequest):             # <<<<<<<<<<<<<<
 *         promise = _VoidPromise()._init(self.thisptr.tailCall(moveRequest(deref(tailRequest.thisptr_child))))
 *         promise.is_consumed = True
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_9tail_call(PyObject *__pyx_v_self, PyObject *__pyx_v_tailRequest); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_CallContext_tail_call(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_tailRequest, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_promise = 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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tail_call", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tail_call); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1774, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_9tail_call)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_tailRequest)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_tailRequest));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1774, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1775
 * 
 *     cpdef tail_call(self, _Request tailRequest):
 *         promise = _VoidPromise()._init(self.thisptr.tailCall(moveRequest(deref(tailRequest.thisptr_child))))             # <<<<<<<<<<<<<<
 *         promise.is_consumed = True
 *         return promise
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__VoidPromise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise *)((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1), __pyx_v_self->thisptr->tailCall(std::move((*__pyx_v_tailRequest->thisptr_child))), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_promise = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":1776
 *     cpdef tail_call(self, _Request tailRequest):
 *         promise = _VoidPromise()._init(self.thisptr.tailCall(moveRequest(deref(tailRequest.thisptr_child))))
 *         promise.is_consumed = True             # <<<<<<<<<<<<<<
 *         return promise
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_promise, __pyx_n_s_is_consumed, Py_True) < 0) __PYX_ERR(0, 1776, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":1777
 *         promise = _VoidPromise()._init(self.thisptr.tailCall(moveRequest(deref(tailRequest.thisptr_child))))
 *         promise.is_consumed = True
 *         return promise             # <<<<<<<<<<<<<<
 * 
 * cdef class _Promise:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_promise);
  __pyx_r = __pyx_v_promise;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1774
 *         self.thisptr.allowCancellation()
 * 
 *     cpdef tail_call(self, _Request tailRequest):             # <<<<<<<<<<<<<<
 *         promise = _VoidPromise()._init(self.thisptr.tailCall(moveRequest(deref(tailRequest.thisptr_child))))
 *         promise.is_consumed = True
 */

  /* 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("capnp.lib.capnp._CallContext.tail_call", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_promise);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_9tail_call(PyObject *__pyx_v_self, PyObject *__pyx_v_tailRequest); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_CallContext_8tail_call[] = "_CallContext.tail_call(self, _Request tailRequest)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_9tail_call(PyObject *__pyx_v_self, PyObject *__pyx_v_tailRequest) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tail_call (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tailRequest), __pyx_ptype_5capnp_3lib_5capnp__Request, 1, "tailRequest", 0))) __PYX_ERR(0, 1774, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_CallContext_8tail_call(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_v_self), ((struct __pyx_obj_5capnp_3lib_5capnp__Request *)__pyx_v_tailRequest));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_8tail_call(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_tailRequest) {
  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("tail_call", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_12_CallContext_tail_call(__pyx_v_self, __pyx_v_tailRequest, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1774, __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("capnp.lib.capnp._CallContext.tail_call", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_CallContext_10__reduce_cython__[] = "_CallContext.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_CallContext_10__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._CallContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_CallContext_12__setstate_cython__[] = "_CallContext.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_CallContext_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_CallContext_12__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__CallContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_CallContext_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__CallContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._CallContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1785
 *     cdef _EventLoop _event_loop
 * 
 *     def __init__(self, obj=None):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             self.is_consumed = True
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_obj = 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_obj,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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj);
          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_ERR(0, 1785, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_obj = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1785, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Promise.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise___init__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self), __pyx_v_obj);

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

static int __pyx_pf_5capnp_3lib_5capnp_8_Promise___init__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_obj) {
  int __pyx_r;
  __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("__init__", 0);

  /* "capnp/lib/capnp.pyx":1786
 * 
 *     def __init__(self, obj=None):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             self.is_consumed = True
 *         else:
 */
  __pyx_t_1 = (__pyx_v_obj == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":1787
 *     def __init__(self, obj=None):
 *         if obj is None:
 *             self.is_consumed = True             # <<<<<<<<<<<<<<
 *         else:
 *             self.is_consumed = False
 */
    __pyx_v_self->is_consumed = 1;

    /* "capnp/lib/capnp.pyx":1786
 * 
 *     def __init__(self, obj=None):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             self.is_consumed = True
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":1789
 *             self.is_consumed = True
 *         else:
 *             self.is_consumed = False             # <<<<<<<<<<<<<<
 *             self._obj = obj
 *             Py_INCREF(obj) # TODO: MEM: fix leak
 */
  /*else*/ {
    __pyx_v_self->is_consumed = 0;

    /* "capnp/lib/capnp.pyx":1790
 *         else:
 *             self.is_consumed = False
 *             self._obj = obj             # <<<<<<<<<<<<<<
 *             Py_INCREF(obj) # TODO: MEM: fix leak
 *             self.thisptr = new PyPromise(<PyObject *>obj)
 */
    __Pyx_INCREF(__pyx_v_obj);
    __Pyx_GIVEREF(__pyx_v_obj);
    __Pyx_GOTREF(__pyx_v_self->_obj);
    __Pyx_DECREF(__pyx_v_self->_obj);
    __pyx_v_self->_obj = __pyx_v_obj;

    /* "capnp/lib/capnp.pyx":1791
 *             self.is_consumed = False
 *             self._obj = obj
 *             Py_INCREF(obj) # TODO: MEM: fix leak             # <<<<<<<<<<<<<<
 *             self.thisptr = new PyPromise(<PyObject *>obj)
 * 
 */
    Py_INCREF(__pyx_v_obj);

    /* "capnp/lib/capnp.pyx":1792
 *             self._obj = obj
 *             Py_INCREF(obj) # TODO: MEM: fix leak
 *             self.thisptr = new PyPromise(<PyObject *>obj)             # <<<<<<<<<<<<<<
 * 
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 */
    __pyx_v_self->thisptr = new __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise(((PyObject *)__pyx_v_obj));
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":1794
 *             self.thisptr = new PyPromise(<PyObject *>obj)
 * 
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, PyPromise other, parent=None):
 */
  __pyx_t_3 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->_event_loop);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_event_loop));
  __pyx_v_self->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":1785
 *     cdef _EventLoop _event_loop
 * 
 *     def __init__(self, obj=None):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             self.is_consumed = True
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._Promise.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1796
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 *     cdef _init(self, PyPromise other, parent=None):             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         self.thisptr = new PyPromise(movePromise(other))
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Promise__init(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise __pyx_v_other, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init *__pyx_optional_args) {
  PyObject *__pyx_v_parent = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent = __pyx_optional_args->parent;
    }
  }

  /* "capnp/lib/capnp.pyx":1797
 * 
 *     cdef _init(self, PyPromise other, parent=None):
 *         self.is_consumed = False             # <<<<<<<<<<<<<<
 *         self.thisptr = new PyPromise(movePromise(other))
 *         self._parent = parent
 */
  __pyx_v_self->is_consumed = 0;

  /* "capnp/lib/capnp.pyx":1798
 *     cdef _init(self, PyPromise other, parent=None):
 *         self.is_consumed = False
 *         self.thisptr = new PyPromise(movePromise(other))             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = new __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise(std::move(__pyx_v_other));

  /* "capnp/lib/capnp.pyx":1799
 *         self.is_consumed = False
 *         self.thisptr = new PyPromise(movePromise(other))
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":1800
 *         self.thisptr = new PyPromise(movePromise(other))
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1796
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 *     cdef _init(self, PyPromise other, parent=None):             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         self.thisptr = new PyPromise(movePromise(other))
 */

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

/* "capnp/lib/capnp.pyx":1802
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_8_Promise_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_8_Promise_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_8_Promise_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_8_Promise_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":1803
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     cpdef wait(self) except +reraise_kj_exception:
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1802
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":1805
 *         del self.thisptr
 * 
 *     cpdef wait(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_5wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Promise_wait(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_ret = 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;
  PyObject *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wait", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_wait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_8_Promise_5wait)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1805, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1806
 * 
 *     cpdef wait(self) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  __pyx_t_5 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_5)) {

    /* "capnp/lib/capnp.pyx":1807
 *     cpdef wait(self) except +reraise_kj_exception:
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 * 
 *         ret = <object>helpers.waitPyPromise(self.thisptr, deref(self._event_loop.thisptr).waitScope)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1807, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1807, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1806
 * 
 *     cpdef wait(self) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1809
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 *         ret = <object>helpers.waitPyPromise(self.thisptr, deref(self._event_loop.thisptr).waitScope)             # <<<<<<<<<<<<<<
 *         Py_DECREF(ret)
 * 
 */
  __pyx_t_6 = waitPyPromise(__pyx_v_self->thisptr, (*__pyx_v_self->_event_loop->thisptr).waitScope);
  __pyx_t_1 = ((PyObject *)__pyx_t_6);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ret = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1810
 * 
 *         ret = <object>helpers.waitPyPromise(self.thisptr, deref(self._event_loop.thisptr).waitScope)
 *         Py_DECREF(ret)             # <<<<<<<<<<<<<<
 * 
 *         self.is_consumed = True
 */
  Py_DECREF(__pyx_v_ret);

  /* "capnp/lib/capnp.pyx":1812
 *         Py_DECREF(ret)
 * 
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1814
 *         self.is_consumed = True
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1805
 *         del self.thisptr
 * 
 *     cpdef wait(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

  /* 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("capnp.lib.capnp._Promise.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_5wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_8_Promise_4wait[] = "_Promise.wait(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_5wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wait (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_4wait(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_4wait(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__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("wait", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_8_Promise_wait(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1805, __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("capnp.lib.capnp._Promise.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1816
 *         return ret
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_7then(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Promise_then(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_func, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_then *__pyx_optional_args) {
  PyObject *__pyx_v_error_func = ((PyObject *)Py_None);
  PyObject *__pyx_v_argspec = NULL;
  PyObject *__pyx_v_args_length = NULL;
  PyObject *__pyx_v_defaults_length = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_new_promise = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("then", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_error_func = __pyx_optional_args->error_func;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_then); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_8_Promise_7then)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_func, __pyx_v_error_func};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1816, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_func, __pyx_v_error_func};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1816, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1816, __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(__pyx_v_func);
          __Pyx_GIVEREF(__pyx_v_func);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_func);
          __Pyx_INCREF(__pyx_v_error_func);
          __Pyx_GIVEREF(__pyx_v_error_func);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_error_func);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1816, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1817
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  __pyx_t_7 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_7)) {

    /* "capnp/lib/capnp.pyx":1818
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 * 
 *         argspec = None
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1818, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1817
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1820
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 *         argspec = None             # <<<<<<<<<<<<<<
 *         try:
 *             argspec = _inspect.getfullargspec(func)
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_argspec = Py_None;

  /* "capnp/lib/capnp.pyx":1821
 * 
 *         argspec = None
 *         try:             # <<<<<<<<<<<<<<
 *             argspec = _inspect.getfullargspec(func)
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "capnp/lib/capnp.pyx":1822
 *         argspec = None
 *         try:
 *             argspec = _inspect.getfullargspec(func)             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getfullargspec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1822, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_func) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_func);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_argspec, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "capnp/lib/capnp.pyx":1821
 * 
 *         argspec = None
 *         try:             # <<<<<<<<<<<<<<
 *             argspec = _inspect.getfullargspec(func)
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "capnp/lib/capnp.pyx":1823
 *         try:
 *             argspec = _inspect.getfullargspec(func)
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         if argspec:
 */
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L9_try_end:;
  }

  /* "capnp/lib/capnp.pyx":1825
 *         except:
 *             pass
 *         if argspec:             # <<<<<<<<<<<<<<
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_argspec); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1825, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "capnp/lib/capnp.pyx":1826
 *             pass
 *         if argspec:
 *             args_length = len(argspec.args) if argspec.args else 0             # <<<<<<<<<<<<<<
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 1:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1826, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1826, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
    }
    __pyx_v_args_length = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1827
 *         if argspec:
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0             # <<<<<<<<<<<<<<
 *             if args_length - defaults_length != 1:
 *                 raise KjException('Function passed to `then` call must take exactly one argument')
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_defaults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1827, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_defaults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1827, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
    }
    __pyx_v_defaults_length = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1828
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 1:             # <<<<<<<<<<<<<<
 *                 raise KjException('Function passed to `then` call must take exactly one argument')
 * 
 */
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_args_length, __pyx_v_defaults_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1828, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__pyx_t_7)) {

      /* "capnp/lib/capnp.pyx":1829
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 1:
 *                 raise KjException('Function passed to `then` call must take exactly one argument')             # <<<<<<<<<<<<<<
 * 
 *         cdef _Promise new_promise = _Promise()._init(helpers.then(deref(self.thisptr), <PyObject *>func, <PyObject *>error_func), self)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_KjException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_kp_s_Function_passed_to_then_call_mus) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_Function_passed_to_then_call_mus);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1829, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":1828
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 1:             # <<<<<<<<<<<<<<
 *                 raise KjException('Function passed to `then` call must take exactly one argument')
 * 
 */
    }

    /* "capnp/lib/capnp.pyx":1825
 *         except:
 *             pass
 *         if argspec:             # <<<<<<<<<<<<<<
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 */
  }

  /* "capnp/lib/capnp.pyx":1831
 *                 raise KjException('Function passed to `then` call must take exactly one argument')
 * 
 *         cdef _Promise new_promise = _Promise()._init(helpers.then(deref(self.thisptr), <PyObject *>func, <PyObject *>error_func), self)             # <<<<<<<<<<<<<<
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.parent = ((PyObject *)__pyx_v_self);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_3), then((*__pyx_v_self->thisptr), ((PyObject *)__pyx_v_func), ((PyObject *)__pyx_v_error_func)), &__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__Promise))))) __PYX_ERR(0, 1831, __pyx_L1_error)
  __pyx_v_new_promise = ((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1832
 * 
 *         cdef _Promise new_promise = _Promise()._init(helpers.then(deref(self.thisptr), <PyObject *>func, <PyObject *>error_func), self)
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)             # <<<<<<<<<<<<<<
 * 
 *     def attach(self, *args):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.parent = ((PyObject *)__pyx_v_new_promise);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1), __pyx_v_new_promise->thisptr->attach( ::kj::heap< PyRefCounter >(((PyObject *)__pyx_v_func)),  ::kj::heap< PyRefCounter >(((PyObject *)__pyx_v_error_func))), &__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1816
 *         return ret
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._Promise.then", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_argspec);
  __Pyx_XDECREF(__pyx_v_args_length);
  __Pyx_XDECREF(__pyx_v_defaults_length);
  __Pyx_XDECREF((PyObject *)__pyx_v_new_promise);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_7then(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_8_Promise_6then[] = "_Promise.then(self, func, error_func=None)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_7then(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_error_func = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("then (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,&__pyx_n_s_error_func,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_func);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "then") < 0)) __PYX_ERR(0, 1816, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_func = values[0];
    __pyx_v_error_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("then", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1816, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Promise.then", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_6then(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self), __pyx_v_func, __pyx_v_error_func);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_6then(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_error_func) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_then __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("then", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.error_func = __pyx_v_error_func;
  try {
    __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__Promise->then(__pyx_v_self, __pyx_v_func, 1, &__pyx_t_2);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1816, __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("capnp.lib.capnp._Promise.then", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1834
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)
 * 
 *     def attach(self, *args):             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_9attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_8_Promise_8attach[] = "_Promise.attach(self, *args)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_9attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("attach (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "attach", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_8attach(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self), __pyx_v_args);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_8attach(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("attach", 0);

  /* "capnp/lib/capnp.pyx":1835
 * 
 *     def attach(self, *args):
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":1836
 *     def attach(self, *args):
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 * 
 *         ret = _Promise()._init(self.thisptr.attach(capnp.makePyRefCounter(<PyObject *>args)), self)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1836, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1835
 * 
 *     def attach(self, *args):
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1838
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 *         ret = _Promise()._init(self.thisptr.attach(capnp.makePyRefCounter(<PyObject *>args)), self)             # <<<<<<<<<<<<<<
 *         self.is_consumed = True
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.parent = ((PyObject *)__pyx_v_self);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_2), __pyx_v_self->thisptr->attach( ::kj::heap< PyRefCounter >(((PyObject *)__pyx_v_args))), &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ret = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":1839
 * 
 *         ret = _Promise()._init(self.thisptr.attach(capnp.makePyRefCounter(<PyObject *>args)), self)
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1841
 *         self.is_consumed = True
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1834
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)
 * 
 *     def attach(self, *args):             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._Promise.attach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1843
 *         return ret
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_11cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Promise_cancel(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_cancel *__pyx_optional_args) {
  PyObject *__pyx_v_numParents = ((PyObject *)__pyx_int_1);
  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_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cancel", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_numParents = __pyx_optional_args->numParents;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cancel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_8_Promise_11cancel)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_numParents) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_numParents);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1843, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1844
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):             # <<<<<<<<<<<<<<
 *             self._parent.cancel(numParents - 1)
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_numParents, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_HasAttr(__pyx_t_1, __pyx_n_s_cancel); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "capnp/lib/capnp.pyx":1845
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)             # <<<<<<<<<<<<<<
 * 
 *         self.is_consumed = True
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_parent, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_numParents, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1845, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __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;

    /* "capnp/lib/capnp.pyx":1844
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):             # <<<<<<<<<<<<<<
 *             self._parent.cancel(numParents - 1)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1847
 *             self._parent.cancel(numParents - 1)
 * 
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         self.thisptr = NULL
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1848
 * 
 *         self.is_consumed = True
 *         del self.thisptr             # <<<<<<<<<<<<<<
 *         self.thisptr = NULL
 * 
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1849
 *         self.is_consumed = True
 *         del self.thisptr
 *         self.thisptr = NULL             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->thisptr = NULL;

  /* "capnp/lib/capnp.pyx":1843
 *         return ret
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)
 */

  /* 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_AddTraceback("capnp.lib.capnp._Promise.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_11cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_8_Promise_10cancel[] = "_Promise.cancel(self, numParents=1)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_11cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_numParents = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numParents,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numParents);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel") < 0)) __PYX_ERR(0, 1843, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_numParents = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cancel", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1843, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Promise.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_10cancel(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self), __pyx_v_numParents);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_10cancel(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_numParents) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_cancel __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cancel", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.numParents = __pyx_v_numParents;
  try {
    __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__Promise->cancel(__pyx_v_self, 1, &__pyx_t_2);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1843, __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("capnp.lib.capnp._Promise.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1781
 * cdef class _Promise:
 *     cdef PyPromise * thisptr
 *     cdef public bint is_consumed             # <<<<<<<<<<<<<<
 *     cdef public object _parent, _obj
 *     cdef _EventLoop _event_loop
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_11is_consumed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_11is_consumed_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_11is_consumed___get__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_consumed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1781, __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("capnp.lib.capnp._Promise.is_consumed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_11is_consumed_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1781, __pyx_L1_error)
  __pyx_v_self->is_consumed = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Promise.is_consumed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1782
 *     cdef PyPromise * thisptr
 *     cdef public bint is_consumed
 *     cdef public object _parent, _obj             # <<<<<<<<<<<<<<
 *     cdef _EventLoop _event_loop
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_4_obj_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_4_obj_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_4_obj___get__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_4_obj___get__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_obj);
  __pyx_r = __pyx_v_self->_obj;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_4_obj_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_4_obj_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_4_obj_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_4_obj_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_obj);
  __Pyx_DECREF(__pyx_v_self->_obj);
  __pyx_v_self->_obj = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_4_obj_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_8_Promise_4_obj_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_4_obj_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_8_Promise_4_obj_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_obj);
  __Pyx_DECREF(__pyx_v_self->_obj);
  __pyx_v_self->_obj = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_8_Promise_12__reduce_cython__[] = "_Promise.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_12__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Promise *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._Promise.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_8_Promise_14__setstate_cython__[] = "_Promise.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Promise_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Promise_14__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Promise_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._Promise.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1858
 *     cdef _EventLoop _event_loop
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.is_consumed = True
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise___init__(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise___init__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":1859
 * 
 *     def __init__(self):
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1860
 *     def __init__(self):
 *         self.is_consumed = True
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, VoidPromise other, parent=None):
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_event_loop);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_event_loop));
  __pyx_v_self->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1858
 *     cdef _EventLoop _event_loop
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.is_consumed = True
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._VoidPromise.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1862
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 *     cdef _init(self, VoidPromise other, parent=None):             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         self.thisptr = new VoidPromise(moveVoidPromise(other))
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise__init(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise __pyx_v_other, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise__init *__pyx_optional_args) {
  PyObject *__pyx_v_parent = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent = __pyx_optional_args->parent;
    }
  }

  /* "capnp/lib/capnp.pyx":1863
 * 
 *     cdef _init(self, VoidPromise other, parent=None):
 *         self.is_consumed = False             # <<<<<<<<<<<<<<
 *         self.thisptr = new VoidPromise(moveVoidPromise(other))
 *         self._parent = parent
 */
  __pyx_v_self->is_consumed = 0;

  /* "capnp/lib/capnp.pyx":1864
 *     cdef _init(self, VoidPromise other, parent=None):
 *         self.is_consumed = False
 *         self.thisptr = new VoidPromise(moveVoidPromise(other))             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = new __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise(std::move(__pyx_v_other));

  /* "capnp/lib/capnp.pyx":1865
 *         self.is_consumed = False
 *         self.thisptr = new VoidPromise(moveVoidPromise(other))
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":1866
 *         self.thisptr = new VoidPromise(moveVoidPromise(other))
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1862
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 *     cdef _init(self, VoidPromise other, parent=None):             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         self.thisptr = new VoidPromise(moveVoidPromise(other))
 */

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

/* "capnp/lib/capnp.pyx":1868
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":1869
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     cpdef wait(self) except +reraise_kj_exception:
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1868
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":1871
 *         del self.thisptr
 * 
 *     cpdef wait(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_5wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_wait(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wait", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_wait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_5wait)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1872
 * 
 *     cpdef wait(self) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  __pyx_t_5 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_5)) {

    /* "capnp/lib/capnp.pyx":1873
 *     cpdef wait(self) except +reraise_kj_exception:
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 * 
 *         helpers.waitVoidPromise(self.thisptr, deref(self._event_loop.thisptr).waitScope)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1873, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1872
 * 
 *     cpdef wait(self) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1875
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 *         helpers.waitVoidPromise(self.thisptr, deref(self._event_loop.thisptr).waitScope)             # <<<<<<<<<<<<<<
 * 
 *         self.is_consumed = True
 */
  waitVoidPromise(__pyx_v_self->thisptr, (*__pyx_v_self->_event_loop->thisptr).waitScope);

  /* "capnp/lib/capnp.pyx":1877
 *         helpers.waitVoidPromise(self.thisptr, deref(self._event_loop.thisptr).waitScope)
 * 
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1871
 *         del self.thisptr
 * 
 *     cpdef wait(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

  /* 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_AddTraceback("capnp.lib.capnp._VoidPromise.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_5wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_4wait[] = "_VoidPromise.wait(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_5wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wait (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_4wait(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_4wait(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__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("wait", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_12_VoidPromise_wait(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1871, __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("capnp.lib.capnp._VoidPromise.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1879
 *         self.is_consumed = True
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7then(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_then(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_func, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_then *__pyx_optional_args) {
  PyObject *__pyx_v_error_func = ((PyObject *)Py_None);
  PyObject *__pyx_v_argspec = NULL;
  PyObject *__pyx_v_args_length = NULL;
  PyObject *__pyx_v_defaults_length = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_new_promise = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("then", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_error_func = __pyx_optional_args->error_func;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_then); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7then)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_func, __pyx_v_error_func};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_func, __pyx_v_error_func};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1879, __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(__pyx_v_func);
          __Pyx_GIVEREF(__pyx_v_func);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_func);
          __Pyx_INCREF(__pyx_v_error_func);
          __Pyx_GIVEREF(__pyx_v_error_func);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_error_func);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1880
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  __pyx_t_7 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_7)) {

    /* "capnp/lib/capnp.pyx":1881
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 * 
 *         argspec = None
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1881, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1881, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1880
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1883
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 *         argspec = None             # <<<<<<<<<<<<<<
 *         try:
 *             argspec = _inspect.getfullargspec(func)
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_argspec = Py_None;

  /* "capnp/lib/capnp.pyx":1884
 * 
 *         argspec = None
 *         try:             # <<<<<<<<<<<<<<
 *             argspec = _inspect.getfullargspec(func)
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "capnp/lib/capnp.pyx":1885
 *         argspec = None
 *         try:
 *             argspec = _inspect.getfullargspec(func)             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getfullargspec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_func) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_func);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_argspec, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "capnp/lib/capnp.pyx":1884
 * 
 *         argspec = None
 *         try:             # <<<<<<<<<<<<<<
 *             argspec = _inspect.getfullargspec(func)
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "capnp/lib/capnp.pyx":1886
 *         try:
 *             argspec = _inspect.getfullargspec(func)
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         if argspec:
 */
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L9_try_end:;
  }

  /* "capnp/lib/capnp.pyx":1888
 *         except:
 *             pass
 *         if argspec:             # <<<<<<<<<<<<<<
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_argspec); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1888, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "capnp/lib/capnp.pyx":1889
 *             pass
 *         if argspec:
 *             args_length = len(argspec.args) if argspec.args else 0             # <<<<<<<<<<<<<<
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 0:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1889, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1889, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
    }
    __pyx_v_args_length = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1890
 *         if argspec:
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0             # <<<<<<<<<<<<<<
 *             if args_length - defaults_length != 0:
 *                 raise KjException('Function passed to `then` call must take no arguments')
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_defaults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_defaults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1890, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
    }
    __pyx_v_defaults_length = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1891
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 0:             # <<<<<<<<<<<<<<
 *                 raise KjException('Function passed to `then` call must take no arguments')
 * 
 */
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_args_length, __pyx_v_defaults_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1891, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__pyx_t_7)) {

      /* "capnp/lib/capnp.pyx":1892
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 0:
 *                 raise KjException('Function passed to `then` call must take no arguments')             # <<<<<<<<<<<<<<
 * 
 *         cdef _Promise new_promise = _Promise()._init(helpers.then(deref(self.thisptr), <PyObject *>func, <PyObject *>error_func), self)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_KjException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_kp_s_Function_passed_to_then_call_mus_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_Function_passed_to_then_call_mus_2);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1892, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1892, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":1891
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 0:             # <<<<<<<<<<<<<<
 *                 raise KjException('Function passed to `then` call must take no arguments')
 * 
 */
    }

    /* "capnp/lib/capnp.pyx":1888
 *         except:
 *             pass
 *         if argspec:             # <<<<<<<<<<<<<<
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 */
  }

  /* "capnp/lib/capnp.pyx":1894
 *                 raise KjException('Function passed to `then` call must take no arguments')
 * 
 *         cdef _Promise new_promise = _Promise()._init(helpers.then(deref(self.thisptr), <PyObject *>func, <PyObject *>error_func), self)             # <<<<<<<<<<<<<<
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.parent = ((PyObject *)__pyx_v_self);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_3), then((*__pyx_v_self->thisptr), ((PyObject *)__pyx_v_func), ((PyObject *)__pyx_v_error_func)), &__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__Promise))))) __PYX_ERR(0, 1894, __pyx_L1_error)
  __pyx_v_new_promise = ((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1895
 * 
 *         cdef _Promise new_promise = _Promise()._init(helpers.then(deref(self.thisptr), <PyObject *>func, <PyObject *>error_func), self)
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.parent = ((PyObject *)__pyx_v_new_promise);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1), __pyx_v_new_promise->thisptr->attach( ::kj::heap< PyRefCounter >(((PyObject *)__pyx_v_func)),  ::kj::heap< PyRefCounter >(((PyObject *)__pyx_v_error_func))), &__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1879
 *         self.is_consumed = True
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._VoidPromise.then", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_argspec);
  __Pyx_XDECREF(__pyx_v_args_length);
  __Pyx_XDECREF(__pyx_v_defaults_length);
  __Pyx_XDECREF((PyObject *)__pyx_v_new_promise);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7then(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_6then[] = "_VoidPromise.then(self, func, error_func=None)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7then(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_error_func = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("then (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,&__pyx_n_s_error_func,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_func);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "then") < 0)) __PYX_ERR(0, 1879, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_func = values[0];
    __pyx_v_error_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("then", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1879, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._VoidPromise.then", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_6then(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self), __pyx_v_func, __pyx_v_error_func);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_6then(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_error_func) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_then __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("then", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.error_func = __pyx_v_error_func;
  try {
    __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__VoidPromise->then(__pyx_v_self, __pyx_v_func, 1, &__pyx_t_2);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1879, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1879, __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("capnp.lib.capnp._VoidPromise.then", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1897
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_9as_pypromise(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_as_pypromise(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_pypromise", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_pypromise); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_9as_pypromise)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1897, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1898
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 */
  __pyx_t_5 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_5)) {

    /* "capnp/lib/capnp.pyx":1899
 *     cpdef as_pypromise(self) except +reraise_kj_exception:
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1899, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1898
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 */
  }

  /* "capnp/lib/capnp.pyx":1900
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)             # <<<<<<<<<<<<<<
 * 
 *     def attach(self, *args):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.parent = ((PyObject *)__pyx_v_self);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1), convert_to_pypromise((*__pyx_v_self->thisptr)), &__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1900, __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;

  /* "capnp/lib/capnp.pyx":1897
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

  /* 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("capnp.lib.capnp._VoidPromise.as_pypromise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_9as_pypromise(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_8as_pypromise[] = "_VoidPromise.as_pypromise(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_9as_pypromise(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_pypromise (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_8as_pypromise(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_8as_pypromise(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__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("as_pypromise", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_12_VoidPromise_as_pypromise(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1897, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1897, __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("capnp.lib.capnp._VoidPromise.as_pypromise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1902
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 * 
 *     def attach(self, *args):             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_11attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_10attach[] = "_VoidPromise.attach(self, *args)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_11attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("attach (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "attach", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_10attach(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self), __pyx_v_args);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_10attach(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_args) {
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise__init __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("attach", 0);

  /* "capnp/lib/capnp.pyx":1903
 * 
 *     def attach(self, *args):
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":1904
 *     def attach(self, *args):
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 * 
 *         ret = _VoidPromise()._init(self.thisptr.attach(capnp.makePyRefCounter(<PyObject *>args)), self)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1904, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1903
 * 
 *     def attach(self, *args):
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1906
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 *         ret = _VoidPromise()._init(self.thisptr.attach(capnp.makePyRefCounter(<PyObject *>args)), self)             # <<<<<<<<<<<<<<
 *         self.is_consumed = True
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__VoidPromise)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.parent = ((PyObject *)__pyx_v_self);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise *)((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_2), __pyx_v_self->thisptr->attach( ::kj::heap< PyRefCounter >(((PyObject *)__pyx_v_args))), &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ret = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":1907
 * 
 *         ret = _VoidPromise()._init(self.thisptr.attach(capnp.makePyRefCounter(<PyObject *>args)), self)
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1909
 *         self.is_consumed = True
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1902
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 * 
 *     def attach(self, *args):             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._VoidPromise.attach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1911
 *         return ret
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_13cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_cancel(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_cancel *__pyx_optional_args) {
  PyObject *__pyx_v_numParents = ((PyObject *)__pyx_int_1);
  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_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cancel", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_numParents = __pyx_optional_args->numParents;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cancel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1911, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_13cancel)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_numParents) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_numParents);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1911, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1912
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):             # <<<<<<<<<<<<<<
 *             self._parent.cancel(numParents - 1)
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_numParents, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_HasAttr(__pyx_t_1, __pyx_n_s_cancel); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "capnp/lib/capnp.pyx":1913
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)             # <<<<<<<<<<<<<<
 * 
 *         self.is_consumed = True
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_parent, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_numParents, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __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;

    /* "capnp/lib/capnp.pyx":1912
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):             # <<<<<<<<<<<<<<
 *             self._parent.cancel(numParents - 1)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1915
 *             self._parent.cancel(numParents - 1)
 * 
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         self.thisptr = NULL
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1916
 * 
 *         self.is_consumed = True
 *         del self.thisptr             # <<<<<<<<<<<<<<
 *         self.thisptr = NULL
 * 
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1917
 *         self.is_consumed = True
 *         del self.thisptr
 *         self.thisptr = NULL             # <<<<<<<<<<<<<<
 * 
 * cdef class _RemotePromise:
 */
  __pyx_v_self->thisptr = NULL;

  /* "capnp/lib/capnp.pyx":1911
 *         return ret
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)
 */

  /* 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_AddTraceback("capnp.lib.capnp._VoidPromise.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_13cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_12cancel[] = "_VoidPromise.cancel(self, numParents=1)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_13cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_numParents = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numParents,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numParents);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel") < 0)) __PYX_ERR(0, 1911, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_numParents = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cancel", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1911, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._VoidPromise.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_12cancel(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self), __pyx_v_numParents);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_12cancel(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_numParents) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_cancel __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cancel", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.numParents = __pyx_v_numParents;
  try {
    __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__VoidPromise->cancel(__pyx_v_self, 1, &__pyx_t_2);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1911, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1911, __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("capnp.lib.capnp._VoidPromise.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1854
 * cdef class _VoidPromise:
 *     cdef VoidPromise * thisptr
 *     cdef public bint is_consumed             # <<<<<<<<<<<<<<
 *     cdef public object _parent
 *     cdef _EventLoop _event_loop
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed___get__(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_consumed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1854, __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("capnp.lib.capnp._VoidPromise.is_consumed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1854, __pyx_L1_error)
  __pyx_v_self->is_consumed = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._VoidPromise.is_consumed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1855
 *     cdef VoidPromise * thisptr
 *     cdef public bint is_consumed
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 *     cdef _EventLoop _event_loop
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_14__reduce_cython__[] = "_VoidPromise.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_14__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._VoidPromise.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_16__setstate_cython__[] = "_VoidPromise.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_16__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12_VoidPromise_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._VoidPromise.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1925
 *     cdef _EventLoop _event_loop
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.is_consumed = True
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise___init__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise___init__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":1926
 * 
 *     def __init__(self):
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1927
 *     def __init__(self):
 *         self.is_consumed = True
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, RemotePromise other, parent):
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_event_loop);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_event_loop));
  __pyx_v_self->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1925
 *     cdef _EventLoop _event_loop
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.is_consumed = True
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1929
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 *     cdef _init(self, RemotePromise other, parent):             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         self.thisptr = new RemotePromise(moveRemotePromise(other))
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise__init(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self,  ::capnp::RemotePromise< ::capnp::DynamicStruct> __pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":1930
 * 
 *     cdef _init(self, RemotePromise other, parent):
 *         self.is_consumed = False             # <<<<<<<<<<<<<<
 *         self.thisptr = new RemotePromise(moveRemotePromise(other))
 *         self._parent = parent
 */
  __pyx_v_self->is_consumed = 0;

  /* "capnp/lib/capnp.pyx":1931
 *     cdef _init(self, RemotePromise other, parent):
 *         self.is_consumed = False
 *         self.thisptr = new RemotePromise(moveRemotePromise(other))             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = new  ::capnp::RemotePromise< ::capnp::DynamicStruct>(std::move(__pyx_v_other));

  /* "capnp/lib/capnp.pyx":1932
 *         self.is_consumed = False
 *         self.thisptr = new RemotePromise(moveRemotePromise(other))
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":1933
 *         self.thisptr = new RemotePromise(moveRemotePromise(other))
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1929
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 * 
 *     cdef _init(self, RemotePromise other, parent):             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         self.thisptr = new RemotePromise(moveRemotePromise(other))
 */

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

/* "capnp/lib/capnp.pyx":1935
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":1936
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     cpdef _wait(self) except +reraise_kj_exception:
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":1935
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":1938
 *         del self.thisptr
 * 
 *     cpdef _wait(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _Response()._init_childptr(helpers.waitRemote(self.thisptr, deref(self._event_loop.thisptr).waitScope), self._parent)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_5_wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise__wait(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_wait", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_wait_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1938, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_5_wait)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1938, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1939
 * 
 *     cpdef _wait(self) except +reraise_kj_exception:
 *         return _Response()._init_childptr(helpers.waitRemote(self.thisptr, deref(self._event_loop.thisptr).waitScope), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     def wait(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Response)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Response *)((struct __pyx_obj_5capnp_3lib_5capnp__Response *)__pyx_t_1)->__pyx_base.__pyx_vtab)->_init_childptr(((struct __pyx_obj_5capnp_3lib_5capnp__Response *)__pyx_t_1), waitRemote(__pyx_v_self->thisptr, (*__pyx_v_self->_event_loop->thisptr).waitScope), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1938
 *         del self.thisptr
 * 
 *     cpdef _wait(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _Response()._init_childptr(helpers.waitRemote(self.thisptr, deref(self._event_loop.thisptr).waitScope), self._parent)
 * 
 */

  /* 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("capnp.lib.capnp._RemotePromise._wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_5_wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_4_wait[] = "_RemotePromise._wait(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_5_wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_wait (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_4_wait(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_4_wait(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__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("_wait", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14_RemotePromise__wait(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1938, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1938, __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("capnp.lib.capnp._RemotePromise._wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1941
 *         return _Response()._init_childptr(helpers.waitRemote(self.thisptr, deref(self._event_loop.thisptr).waitScope), self._parent)
 * 
 *     def wait(self):             # <<<<<<<<<<<<<<
 *         """Wait on the promise. This will block until the promise has completed."""
 *         if self.is_consumed:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_6wait[] = "_RemotePromise.wait(self)\nWait on the promise. This will block until the promise has completed.";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wait (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_6wait(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_6wait(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self) {
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wait", 0);

  /* "capnp/lib/capnp.pyx":1943
 *     def wait(self):
 *         """Wait on the promise. This will block until the promise has completed."""
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":1944
 *         """Wait on the promise. This will block until the promise has completed."""
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 * 
 *         ret = self._wait()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1944, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1943
 *     def wait(self):
 *         """Wait on the promise. This will block until the promise has completed."""
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1946
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 *         ret = self._wait()             # <<<<<<<<<<<<<<
 *         self.is_consumed = True
 *         return ret
 */
  try {
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self->__pyx_vtab)->_wait(__pyx_v_self, 0);
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1946, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1946, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_ret = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":1947
 * 
 *         ret = self._wait()
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 *         return ret
 * 
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1948
 *         ret = self._wait()
 *         self.is_consumed = True
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     async def a_wait(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1941
 *         return _Response()._init_childptr(helpers.waitRemote(self.thisptr, deref(self._event_loop.thisptr).waitScope), self._parent)
 * 
 *     def wait(self):             # <<<<<<<<<<<<<<
 *         """Wait on the promise. This will block until the promise has completed."""
 *         if self.is_consumed:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_14_RemotePromise_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":1950
 *         return ret
 * 
 *     async def a_wait(self):             # <<<<<<<<<<<<<<
 *         """
 *         Asyncio version of wait().
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_9a_wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_8a_wait[] = "_RemotePromise.a_wait(self)\n\n        Asyncio version of wait().\n        Required when using asyncio for socket communication.\n\n        Will still work with non-asyncio socket communication, but requires async handling of the function call.\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_9a_wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("a_wait (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_8a_wait(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_8a_wait(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("a_wait", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1950, __pyx_L1_error)
  } else {
    __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_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_14_RemotePromise_10generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_a_wait, __pyx_n_s_RemotePromise_a_wait, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 1950, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.a_wait", __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_5capnp_3lib_5capnp_14_RemotePromise_10generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  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_RefNannyDeclarations
  __Pyx_RefNannySetupContext("a_wait", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L7_resume_from_await;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1950, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":1957
 *         Will still work with non-asyncio socket communication, but requires async handling of the function call.
 *         """
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":1958
 *         """
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 * 
 *         while not helpers.pollRemote(self.thisptr, deref(self._event_loop.thisptr).waitScope):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1958, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1957
 *         Will still work with non-asyncio socket communication, but requires async handling of the function call.
 *         """
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1960
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 *         while not helpers.pollRemote(self.thisptr, deref(self._event_loop.thisptr).waitScope):             # <<<<<<<<<<<<<<
 *             await asyncio.sleep(0.01)
 *         ret = self._wait()
 */
  while (1) {
    __pyx_t_1 = ((!(pollRemote(__pyx_cur_scope->__pyx_v_self->thisptr, (*__pyx_cur_scope->__pyx_v_self->_event_loop->thisptr).waitScope) != 0)) != 0);
    if (!__pyx_t_1) break;

    /* "capnp/lib/capnp.pyx":1961
 * 
 *         while not helpers.pollRemote(self.thisptr, deref(self._event_loop.thisptr).waitScope):
 *             await asyncio.sleep(0.01)             # <<<<<<<<<<<<<<
 *         ret = self._wait()
 *         self.is_consumed = True
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sleep); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_float_0_01);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XGOTREF(__pyx_r);
    if (likely(__pyx_r)) {
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, awaiting value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L7_resume_from_await:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1961, __pyx_L1_error)
    } else {
      PyObject* exc_type = __Pyx_PyErr_Occurred();
      if (exc_type) {
        if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
        else __PYX_ERR(0, 1961, __pyx_L1_error)
      }
    }
  }

  /* "capnp/lib/capnp.pyx":1962
 *         while not helpers.pollRemote(self.thisptr, deref(self._event_loop.thisptr).waitScope):
 *             await asyncio.sleep(0.01)
 *         ret = self._wait()             # <<<<<<<<<<<<<<
 *         self.is_consumed = True
 * 
 */
  try {
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__RemotePromise *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_wait(__pyx_cur_scope->__pyx_v_self, 0);
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1962, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1962, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_ret = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":1963
 *             await asyncio.sleep(0.01)
 *         ret = self._wait()
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
  __pyx_cur_scope->__pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":1965
 *         self.is_consumed = True
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_cur_scope->__pyx_v_ret);
  goto __pyx_L0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "capnp/lib/capnp.pyx":1950
 *         return ret
 * 
 *     async def a_wait(self):             # <<<<<<<<<<<<<<
 *         """
 *         Asyncio version of wait().
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("a_wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1967
 *         return ret
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_12as_pypromise(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise_as_pypromise(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_pypromise", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_pypromise); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_12as_pypromise)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1968
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 */
  __pyx_t_5 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_5)) {

    /* "capnp/lib/capnp.pyx":1969
 *     cpdef as_pypromise(self) except +reraise_kj_exception:
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1969, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1968
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 */
  }

  /* "capnp/lib/capnp.pyx":1970
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)             # <<<<<<<<<<<<<<
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.parent = ((PyObject *)__pyx_v_self);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1), convert_to_pypromise((*__pyx_v_self->thisptr)), &__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1970, __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;

  /* "capnp/lib/capnp.pyx":1967
 *         return ret
 * 
 *     cpdef as_pypromise(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 */

  /* 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("capnp.lib.capnp._RemotePromise.as_pypromise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_12as_pypromise(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_11as_pypromise[] = "_RemotePromise.as_pypromise(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_12as_pypromise(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_pypromise (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_11as_pypromise(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_11as_pypromise(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__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("as_pypromise", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14_RemotePromise_as_pypromise(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1967, __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("capnp.lib.capnp._RemotePromise.as_pypromise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1972
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """Promise pipelining, use to queue up operations on a promise before executing the promise."""
 *         if self.is_consumed:
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_14then(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise_then(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_func, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_then *__pyx_optional_args) {
  PyObject *__pyx_v_error_func = ((PyObject *)Py_None);
  PyObject *__pyx_v_argspec = NULL;
  PyObject *__pyx_v_args_length = NULL;
  PyObject *__pyx_v_defaults_length = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_new_promise = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("then", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_error_func = __pyx_optional_args->error_func;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_then); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_14then)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_func, __pyx_v_error_func};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1972, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_func, __pyx_v_error_func};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1972, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1972, __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(__pyx_v_func);
          __Pyx_GIVEREF(__pyx_v_func);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_func);
          __Pyx_INCREF(__pyx_v_error_func);
          __Pyx_GIVEREF(__pyx_v_error_func);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_error_func);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1972, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1974
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 *         """Promise pipelining, use to queue up operations on a promise before executing the promise."""
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  __pyx_t_7 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_7)) {

    /* "capnp/lib/capnp.pyx":1975
 *         """Promise pipelining, use to queue up operations on a promise before executing the promise."""
 *         if self.is_consumed:
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')             # <<<<<<<<<<<<<<
 * 
 *         argspec = None
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Promise_was_already_used_in_a_co) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Promise_was_already_used_in_a_co);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1975, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1974
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:
 *         """Promise pipelining, use to queue up operations on a promise before executing the promise."""
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":1977
 *             raise KjException('Promise was already used in a consuming operation. You can no longer use this Promise object')
 * 
 *         argspec = None             # <<<<<<<<<<<<<<
 *         try:
 *             argspec = _inspect.getfullargspec(func)
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_argspec = Py_None;

  /* "capnp/lib/capnp.pyx":1978
 * 
 *         argspec = None
 *         try:             # <<<<<<<<<<<<<<
 *             argspec = _inspect.getfullargspec(func)
 *         except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "capnp/lib/capnp.pyx":1979
 *         argspec = None
 *         try:
 *             argspec = _inspect.getfullargspec(func)             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_inspect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1979, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getfullargspec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1979, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_func) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_func);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1979, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_argspec, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "capnp/lib/capnp.pyx":1978
 * 
 *         argspec = None
 *         try:             # <<<<<<<<<<<<<<
 *             argspec = _inspect.getfullargspec(func)
 *         except:
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __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;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "capnp/lib/capnp.pyx":1980
 *         try:
 *             argspec = _inspect.getfullargspec(func)
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         if argspec:
 */
    /*except:*/ {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L9_try_end:;
  }

  /* "capnp/lib/capnp.pyx":1982
 *         except:
 *             pass
 *         if argspec:             # <<<<<<<<<<<<<<
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_argspec); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1982, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "capnp/lib/capnp.pyx":1983
 *             pass
 *         if argspec:
 *             args_length = len(argspec.args) if argspec.args else 0             # <<<<<<<<<<<<<<
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 1:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1983, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1983, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
    }
    __pyx_v_args_length = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1984
 *         if argspec:
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0             # <<<<<<<<<<<<<<
 *             if args_length - defaults_length != 1:
 *                 raise KjException('Function passed to `then` call must take exactly one argument')
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_defaults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1984, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1984, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_argspec, __pyx_n_s_defaults); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1984, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
    }
    __pyx_v_defaults_length = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":1985
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 1:             # <<<<<<<<<<<<<<
 *                 raise KjException('Function passed to `then` call must take exactly one argument')
 * 
 */
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_args_length, __pyx_v_defaults_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1985, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1985, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__pyx_t_7)) {

      /* "capnp/lib/capnp.pyx":1986
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 1:
 *                 raise KjException('Function passed to `then` call must take exactly one argument')             # <<<<<<<<<<<<<<
 * 
 *         cdef _Promise new_promise = _Promise()._init(helpers.then(deref(self.thisptr), <PyObject *>func, <PyObject *>error_func), self)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_KjException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_kp_s_Function_passed_to_then_call_mus) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_Function_passed_to_then_call_mus);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1986, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":1985
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 *             if args_length - defaults_length != 1:             # <<<<<<<<<<<<<<
 *                 raise KjException('Function passed to `then` call must take exactly one argument')
 * 
 */
    }

    /* "capnp/lib/capnp.pyx":1982
 *         except:
 *             pass
 *         if argspec:             # <<<<<<<<<<<<<<
 *             args_length = len(argspec.args) if argspec.args else 0
 *             defaults_length = len(argspec.defaults) if argspec.defaults else 0
 */
  }

  /* "capnp/lib/capnp.pyx":1988
 *                 raise KjException('Function passed to `then` call must take exactly one argument')
 * 
 *         cdef _Promise new_promise = _Promise()._init(helpers.then(deref(self.thisptr), <PyObject *>func, <PyObject *>error_func), self)             # <<<<<<<<<<<<<<
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.parent = ((PyObject *)__pyx_v_self);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_3), then((*__pyx_v_self->thisptr), ((PyObject *)__pyx_v_func), ((PyObject *)__pyx_v_error_func)), &__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__Promise))))) __PYX_ERR(0, 1988, __pyx_L1_error)
  __pyx_v_new_promise = ((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1989
 * 
 *         cdef _Promise new_promise = _Promise()._init(helpers.then(deref(self.thisptr), <PyObject *>func, <PyObject *>error_func), self)
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _get(self, field) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12.__pyx_n = 1;
  __pyx_t_12.parent = ((PyObject *)__pyx_v_new_promise);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1), __pyx_v_new_promise->thisptr->attach( ::kj::heap< PyRefCounter >(((PyObject *)__pyx_v_func)),  ::kj::heap< PyRefCounter >(((PyObject *)__pyx_v_error_func))), &__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":1972
 *         return _Promise()._init(helpers.convert_to_pypromise(deref(self.thisptr)), self)
 * 
 *     cpdef then(self, func, error_func=None) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """Promise pipelining, use to queue up operations on a promise before executing the promise."""
 *         if self.is_consumed:
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.then", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_argspec);
  __Pyx_XDECREF(__pyx_v_args_length);
  __Pyx_XDECREF(__pyx_v_defaults_length);
  __Pyx_XDECREF((PyObject *)__pyx_v_new_promise);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_14then(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_13then[] = "_RemotePromise.then(self, func, error_func=None)\nPromise pipelining, use to queue up operations on a promise before executing the promise.";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_14then(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  PyObject *__pyx_v_error_func = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("then (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func,&__pyx_n_s_error_func,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_func)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error_func);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "then") < 0)) __PYX_ERR(0, 1972, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_func = values[0];
    __pyx_v_error_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("then", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1972, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.then", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_13then(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self), __pyx_v_func, __pyx_v_error_func);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_13then(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_func, PyObject *__pyx_v_error_func) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_then __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("then", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.error_func = __pyx_v_error_func;
  try {
    __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__RemotePromise->then(__pyx_v_self, __pyx_v_func, 1, &__pyx_t_2);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1972, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1972, __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("capnp.lib.capnp._RemotePromise.then", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1991
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)
 * 
 *     cpdef _get(self, field) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_16_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise__get(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_field, int __pyx_skip_dispatch) {
  int __pyx_v_type;
  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;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_16_get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_field) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_field);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1991, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":1992
 * 
 *     cpdef _get(self, field) except +reraise_kj_exception:
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()             # <<<<<<<<<<<<<<
 *         if type == capnp.TYPE_CAPABILITY:
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 */
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1992, __pyx_L1_error)
  __pyx_v_type = (( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).getType();

  /* "capnp/lib/capnp.pyx":1993
 *     cpdef _get(self, field) except +reraise_kj_exception:
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:             # <<<<<<<<<<<<<<
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 *         elif type == capnp.TYPE_STRUCT:
 */
  switch (__pyx_v_type) {
    case  ::capnp::DynamicValue::CAPABILITY:

    /* "capnp/lib/capnp.pyx":1994
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)             # <<<<<<<<<<<<<<
 *         elif type == capnp.TYPE_STRUCT:
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1994, __pyx_L1_error)
    __pyx_t_2 = __pyx_v_self->_parent;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), (( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).releaseAs< ::capnp::DynamicCapability>(), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1994, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":1993
 *     cpdef _get(self, field) except +reraise_kj_exception:
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:             # <<<<<<<<<<<<<<
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 *         elif type == capnp.TYPE_STRUCT:
 */
    break;
    case  ::capnp::DynamicValue::STRUCT:

    /* "capnp/lib/capnp.pyx":1996
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 *         elif type == capnp.TYPE_STRUCT:
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)             # <<<<<<<<<<<<<<
 *         elif type == capnp.TYPE_UNKNOWN:
 *             raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructPipeline)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_field); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1996, __pyx_L1_error)
    __pyx_t_2 = __pyx_v_self->_parent;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructPipeline *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)__pyx_t_3), new  ::capnp::DynamicStruct::Pipeline((( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).releaseAs< ::capnp::DynamicStruct>()), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1996, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":1995
 *         if type == capnp.TYPE_CAPABILITY:
 *             return _DynamicCapabilityClient()._init((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asCapability(), self._parent)
 *         elif type == capnp.TYPE_STRUCT:             # <<<<<<<<<<<<<<
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
 *         elif type == capnp.TYPE_UNKNOWN:
 */
    break;
    case  ::capnp::DynamicValue::UNKNOWN:

    /* "capnp/lib/capnp.pyx":1998
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
 *         elif type == capnp.TYPE_UNKNOWN:
 *             raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")             # <<<<<<<<<<<<<<
 *         else:
 *             raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Cannot_convert_type_to_Python_Ty) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Cannot_convert_type_to_Python_Ty);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1998, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1998, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":1997
 *         elif type == capnp.TYPE_STRUCT:
 *             return _DynamicStructPipeline()._init(new C_DynamicStruct.Pipeline((<C_DynamicValue.Pipeline>self.thisptr.get(field)).asStruct()), self._parent)
 *         elif type == capnp.TYPE_UNKNOWN:             # <<<<<<<<<<<<<<
 *             raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 *         else:
 */
    break;
    default:

    /* "capnp/lib/capnp.pyx":2000
 *             raise KjException("Cannot convert type to Python. Type is unknown by capnproto library")
 *         else:
 *             raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, field):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Cannot_convert_type_to_Python_Ty_2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Cannot_convert_type_to_Python_Ty_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2000, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2000, __pyx_L1_error)
    break;
  }

  /* "capnp/lib/capnp.pyx":1991
 *         return _Promise()._init(new_promise.thisptr.attach(capnp.makePyRefCounter(<PyObject *>func), capnp.makePyRefCounter(<PyObject *>error_func)), new_promise)
 * 
 *     cpdef _get(self, field) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef int type = (<C_DynamicValue.Pipeline>self.thisptr.get(field)).getType()
 *         if type == capnp.TYPE_CAPABILITY:
 */

  /* 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("capnp.lib.capnp._RemotePromise._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_16_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_15_get[] = "_RemotePromise._get(self, field)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_16_get(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_15_get(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_15_get(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14_RemotePromise__get(__pyx_v_self, __pyx_v_field, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1991, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 1991, __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("capnp.lib.capnp._RemotePromise._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2002
 *             raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return self._get(field)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_18__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_18__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_17__getattr__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_17__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "capnp/lib/capnp.pyx":2003
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":2004
 *     def __getattr__(self, field):
 *         try:
 *             return self._get(field)             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]
 */
      __Pyx_XDECREF(__pyx_r);
      try {
        __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, __pyx_v_field, 0);
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2004, __pyx_L3_error)
      } catch(...) {
        reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
        __PYX_ERR(0, 2004, __pyx_L3_error)
      }
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":2003
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":2005
 *         try:
 *             return self._get(field)
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 */
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_KjException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2005, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 2005, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;

      /* "capnp/lib/capnp.pyx":2006
 *             return self._get(field)
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]             # <<<<<<<<<<<<<<
 * 
 *     property schema:
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_to_python); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2006, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2006, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2006, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2006, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2006, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2006, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_7, Py_None, __pyx_t_11, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(0, 2006, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":2003
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return self._get(field)
 *         except KjException as e:
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":2002
 *             raise KjException("Cannot convert type to Python. Type is unhandled by capnproto library")
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return self._get(field)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2010
 *     property schema:
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _StructSchema()._init(self.thisptr.getSchema())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__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("__get__", 0);

  /* "capnp/lib/capnp.pyx":2011
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):
 *             return _StructSchema()._init(self.thisptr.getSchema())             # <<<<<<<<<<<<<<
 * 
 *     def __dir__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1), __pyx_v_self->thisptr->getSchema()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2011, __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;

  /* "capnp/lib/capnp.pyx":2010
 *     property schema:
 *         """A property that returns the _StructSchema object matching this reader"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _StructSchema()._init(self.thisptr.getSchema())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2013
 *             return _StructSchema()._init(self.thisptr.getSchema())
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_20__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_19__dir__[] = "_RemotePromise.__dir__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_20__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dir__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_19__dir__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_19__dir__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dir__", 0);

  /* "capnp/lib/capnp.pyx":2014
 * 
 *     def __dir__(self):
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))             # <<<<<<<<<<<<<<
 * 
 *     def to_dict(self, verbose=False, ordered=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fieldnames); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Dir(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2013
 *             return _StructSchema()._init(self.thisptr.getSchema())
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.__dir__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2016
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 *     def to_dict(self, verbose=False, ordered=False):             # <<<<<<<<<<<<<<
 *         return _to_dict(self, verbose, ordered)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_22to_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_21to_dict[] = "_RemotePromise.to_dict(self, verbose=False, ordered=False)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_22to_dict(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_verbose = 0;
  PyObject *__pyx_v_ordered = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_dict (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_verbose,&__pyx_n_s_ordered,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_False);
    values[1] = ((PyObject *)Py_False);
    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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ordered);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_dict") < 0)) __PYX_ERR(0, 2016, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_verbose = values[0];
    __pyx_v_ordered = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("to_dict", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2016, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_21to_dict(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self), __pyx_v_verbose, __pyx_v_ordered);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_21to_dict(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_ordered) {
  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("to_dict", 0);

  /* "capnp/lib/capnp.pyx":2017
 * 
 *     def to_dict(self, verbose=False, ordered=False):
 *         return _to_dict(self, verbose, ordered)             # <<<<<<<<<<<<<<
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2017, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ordered); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2017, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp__to_dict(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2016
 *         return list(set(self.schema.fieldnames + tuple(dir(self.__class__))))
 * 
 *     def to_dict(self, verbose=False, ordered=False):             # <<<<<<<<<<<<<<
 *         return _to_dict(self, verbose, ordered)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2019
 *         return _to_dict(self, verbose, ordered)
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_24cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_RemotePromise_cancel(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_cancel *__pyx_optional_args) {
  PyObject *__pyx_v_numParents = ((PyObject *)__pyx_int_1);
  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_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cancel", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_numParents = __pyx_optional_args->numParents;
    }
  }
  /* 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cancel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_24cancel)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_numParents) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_numParents);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2019, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2020
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):             # <<<<<<<<<<<<<<
 *             self._parent.cancel(numParents - 1)
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_numParents, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2020, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2020, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_HasAttr(__pyx_t_1, __pyx_n_s_cancel); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2020, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "capnp/lib/capnp.pyx":2021
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)             # <<<<<<<<<<<<<<
 * 
 *         self.is_consumed = True
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_parent, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_numParents, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __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;

    /* "capnp/lib/capnp.pyx":2020
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):             # <<<<<<<<<<<<<<
 *             self._parent.cancel(numParents - 1)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":2023
 *             self._parent.cancel(numParents - 1)
 * 
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         self.thisptr = NULL
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":2024
 * 
 *         self.is_consumed = True
 *         del self.thisptr             # <<<<<<<<<<<<<<
 *         self.thisptr = NULL
 * 
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":2025
 *         self.is_consumed = True
 *         del self.thisptr
 *         self.thisptr = NULL             # <<<<<<<<<<<<<<
 * 
 *     # def attach(self, *args):
 */
  __pyx_v_self->thisptr = NULL;

  /* "capnp/lib/capnp.pyx":2019
 *         return _to_dict(self, verbose, ordered)
 * 
 *     cpdef cancel(self, numParents=1) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         if numParents > 0 and hasattr(self._parent, 'cancel'):
 *             self._parent.cancel(numParents - 1)
 */

  /* 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_AddTraceback("capnp.lib.capnp._RemotePromise.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_24cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_23cancel[] = "_RemotePromise.cancel(self, numParents=1)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_24cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_numParents = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_numParents,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_numParents);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel") < 0)) __PYX_ERR(0, 2019, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_numParents = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cancel", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2019, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_23cancel(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self), __pyx_v_numParents);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_23cancel(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_numParents) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_cancel __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cancel", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.numParents = __pyx_v_numParents;
  try {
    __pyx_t_1 = __pyx_vtabptr_5capnp_3lib_5capnp__RemotePromise->cancel(__pyx_v_self, 1, &__pyx_t_2);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2019, __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("capnp.lib.capnp._RemotePromise.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1921
 * cdef class _RemotePromise:
 *     cdef RemotePromise * thisptr
 *     cdef public bint is_consumed             # <<<<<<<<<<<<<<
 *     cdef public object _parent
 *     cdef _EventLoop _event_loop
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed___get__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_consumed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1921, __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("capnp.lib.capnp._RemotePromise.is_consumed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L1_error)
  __pyx_v_self->is_consumed = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.is_consumed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":1922
 *     cdef RemotePromise * thisptr
 *     cdef public bint is_consumed
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 *     cdef _EventLoop _event_loop
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_26__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_25__reduce_cython__[] = "_RemotePromise.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_26__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_25__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_25__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_28__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_27__setstate_cython__[] = "_RemotePromise.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_28__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_27__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_RemotePromise_27__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._RemotePromise.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2036
 *     #     return ret
 * 
 * cpdef join_promises(promises) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *     heap = capnp.heapArrayBuilderPyPromise(len(promises))
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_21join_promises(PyObject *__pyx_self, PyObject *__pyx_v_promises); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_join_promises(PyObject *__pyx_v_promises, CYTHON_UNUSED int __pyx_skip_dispatch) {
   ::kj::ArrayBuilder<__pyx_t_5capnp_8includes_9capnp_cpp_PyPromise>  __pyx_v_heap;
  PyObject *__pyx_v_new_promises = NULL;
  PyObject *__pyx_v_new_promises_append = NULL;
  PyObject *__pyx_v_promise = NULL;
  PyTypeObject *__pyx_v_promise_type = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__Promise *__pyx_v_pyPromise = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  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_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("join_promises", 0);

  /* "capnp/lib/capnp.pyx":2037
 * 
 * cpdef join_promises(promises) except +reraise_kj_exception:
 *     heap = capnp.heapArrayBuilderPyPromise(len(promises))             # <<<<<<<<<<<<<<
 * 
 *     new_promises = []
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_promises); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2037, __pyx_L1_error)
  __pyx_v_heap = ::kj::heapArrayBuilder< ::kj::Promise<PyObject *> >(__pyx_t_1);

  /* "capnp/lib/capnp.pyx":2039
 *     heap = capnp.heapArrayBuilderPyPromise(len(promises))
 * 
 *     new_promises = []             # <<<<<<<<<<<<<<
 *     new_promises_append = new_promises.append
 * 
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_new_promises = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2040
 * 
 *     new_promises = []
 *     new_promises_append = new_promises.append             # <<<<<<<<<<<<<<
 * 
 *     for promise in promises:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_promises, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_new_promises_append = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2042
 *     new_promises_append = new_promises.append
 * 
 *     for promise in promises:             # <<<<<<<<<<<<<<
 *         promise_type = type(promise)
 *         if promise_type is _Promise:
 */
  if (likely(PyList_CheckExact(__pyx_v_promises)) || PyTuple_CheckExact(__pyx_v_promises)) {
    __pyx_t_2 = __pyx_v_promises; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_promises); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2042, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 2042, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2042, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 2042, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2042, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_2);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2042, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_promise, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":2043
 * 
 *     for promise in promises:
 *         promise_type = type(promise)             # <<<<<<<<<<<<<<
 *         if promise_type is _Promise:
 *             pyPromise = <_Promise>promise
 */
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_promise)));
    __Pyx_XDECREF_SET(__pyx_v_promise_type, ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_promise))));

    /* "capnp/lib/capnp.pyx":2044
 *     for promise in promises:
 *         promise_type = type(promise)
 *         if promise_type is _Promise:             # <<<<<<<<<<<<<<
 *             pyPromise = <_Promise>promise
 *         elif promise_type is _RemotePromise or promise_type is _VoidPromise:
 */
    __pyx_t_5 = (__pyx_v_promise_type == __pyx_ptype_5capnp_3lib_5capnp__Promise);
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "capnp/lib/capnp.pyx":2045
 *         promise_type = type(promise)
 *         if promise_type is _Promise:
 *             pyPromise = <_Promise>promise             # <<<<<<<<<<<<<<
 *         elif promise_type is _RemotePromise or promise_type is _VoidPromise:
 *             pyPromise = <_Promise>promise.as_pypromise()
 */
      __pyx_t_4 = __pyx_v_promise;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_pyPromise, ((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_4));
      __pyx_t_4 = 0;

      /* "capnp/lib/capnp.pyx":2044
 *     for promise in promises:
 *         promise_type = type(promise)
 *         if promise_type is _Promise:             # <<<<<<<<<<<<<<
 *             pyPromise = <_Promise>promise
 *         elif promise_type is _RemotePromise or promise_type is _VoidPromise:
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":2046
 *         if promise_type is _Promise:
 *             pyPromise = <_Promise>promise
 *         elif promise_type is _RemotePromise or promise_type is _VoidPromise:             # <<<<<<<<<<<<<<
 *             pyPromise = <_Promise>promise.as_pypromise()
 *             new_promises_append(pyPromise)
 */
    __pyx_t_5 = (__pyx_v_promise_type == __pyx_ptype_5capnp_3lib_5capnp__RemotePromise);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_promise_type == __pyx_ptype_5capnp_3lib_5capnp__VoidPromise);
    __pyx_t_5 = (__pyx_t_7 != 0);
    __pyx_t_6 = __pyx_t_5;
    __pyx_L6_bool_binop_done:;
    if (likely(__pyx_t_6)) {

      /* "capnp/lib/capnp.pyx":2047
 *             pyPromise = <_Promise>promise
 *         elif promise_type is _RemotePromise or promise_type is _VoidPromise:
 *             pyPromise = <_Promise>promise.as_pypromise()             # <<<<<<<<<<<<<<
 *             new_promises_append(pyPromise)
 *         else:
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_promise, __pyx_n_s_as_pypromise); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && 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);
        }
      }
      __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_pyPromise, ((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "capnp/lib/capnp.pyx":2048
 *         elif promise_type is _RemotePromise or promise_type is _VoidPromise:
 *             pyPromise = <_Promise>promise.as_pypromise()
 *             new_promises_append(pyPromise)             # <<<<<<<<<<<<<<
 *         else:
 *             raise KjException('One of the promises passed to `join_promises` had a non promise value of: ' + str(promise))
 */
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_promises, ((PyObject *)__pyx_v_pyPromise)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2048, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":2046
 *         if promise_type is _Promise:
 *             pyPromise = <_Promise>promise
 *         elif promise_type is _RemotePromise or promise_type is _VoidPromise:             # <<<<<<<<<<<<<<
 *             pyPromise = <_Promise>promise.as_pypromise()
 *             new_promises_append(pyPromise)
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":2050
 *             new_promises_append(pyPromise)
 *         else:
 *             raise KjException('One of the promises passed to `join_promises` had a non promise value of: ' + str(promise))             # <<<<<<<<<<<<<<
 *         heap.add(movePromise(deref(pyPromise.thisptr)))
 *         pyPromise.is_consumed = True
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_KjException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_promise); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = PyNumber_Add(__pyx_kp_s_One_of_the_promises_passed_to_jo, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2050, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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);
        }
      }
      __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_11);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2050, __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_ERR(0, 2050, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "capnp/lib/capnp.pyx":2051
 *         else:
 *             raise KjException('One of the promises passed to `join_promises` had a non promise value of: ' + str(promise))
 *         heap.add(movePromise(deref(pyPromise.thisptr)))             # <<<<<<<<<<<<<<
 *         pyPromise.is_consumed = True
 * 
 */
    (void)(__pyx_v_heap.add(std::move((*__pyx_v_pyPromise->thisptr))));

    /* "capnp/lib/capnp.pyx":2052
 *             raise KjException('One of the promises passed to `join_promises` had a non promise value of: ' + str(promise))
 *         heap.add(movePromise(deref(pyPromise.thisptr)))
 *         pyPromise.is_consumed = True             # <<<<<<<<<<<<<<
 * 
 *     return _Promise()._init(helpers.then(capnp.joinPromises(heap.finish())))
 */
    __pyx_v_pyPromise->is_consumed = 1;

    /* "capnp/lib/capnp.pyx":2042
 *     new_promises_append = new_promises.append
 * 
 *     for promise in promises:             # <<<<<<<<<<<<<<
 *         promise_type = type(promise)
 *         if promise_type is _Promise:
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2054
 *         pyPromise.is_consumed = True
 * 
 *     return _Promise()._init(helpers.then(capnp.joinPromises(heap.finish())))             # <<<<<<<<<<<<<<
 * 
 * cdef class _Request(_DynamicStructBuilder):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_2), then( ::kj::joinPromises(__pyx_v_heap.finish())), NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2036
 *     #     return ret
 * 
 * cpdef join_promises(promises) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *     heap = capnp.heapArrayBuilderPyPromise(len(promises))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp.join_promises", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_new_promises);
  __Pyx_XDECREF(__pyx_v_new_promises_append);
  __Pyx_XDECREF(__pyx_v_promise);
  __Pyx_XDECREF(__pyx_v_promise_type);
  __Pyx_XDECREF((PyObject *)__pyx_v_pyPromise);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21join_promises(PyObject *__pyx_self, PyObject *__pyx_v_promises); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20join_promises[] = "join_promises(promises)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21join_promises(PyObject *__pyx_self, PyObject *__pyx_v_promises) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("join_promises (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20join_promises(__pyx_self, ((PyObject *)__pyx_v_promises));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20join_promises(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_promises) {
  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("join_promises", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_join_promises(__pyx_v_promises, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2036, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2036, __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("capnp.lib.capnp.join_promises", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2060
 *     cdef public bint is_consumed
 * 
 *     cdef _init_child(self, Request other, parent):             # <<<<<<<<<<<<<<
 *         self.thisptr_child = new Request(moveRequest(other))
 *         self._init(<DynamicStruct_Builder>deref(self.thisptr_child), parent)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Request__init_child(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self,  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct> __pyx_v_other, PyObject *__pyx_v_parent) {
  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("_init_child", 0);

  /* "capnp/lib/capnp.pyx":2061
 * 
 *     cdef _init_child(self, Request other, parent):
 *         self.thisptr_child = new Request(moveRequest(other))             # <<<<<<<<<<<<<<
 *         self._init(<DynamicStruct_Builder>deref(self.thisptr_child), parent)
 *         self.is_consumed = False
 */
  __pyx_v_self->thisptr_child = new  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct>(std::move(__pyx_v_other));

  /* "capnp/lib/capnp.pyx":2062
 *     cdef _init_child(self, Request other, parent):
 *         self.thisptr_child = new Request(moveRequest(other))
 *         self._init(<DynamicStruct_Builder>deref(self.thisptr_child), parent)             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         return self
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Request *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_v_self), (( ::capnp::DynamicStruct::Builder)(*__pyx_v_self->thisptr_child)), __pyx_v_parent, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2063
 *         self.thisptr_child = new Request(moveRequest(other))
 *         self._init(<DynamicStruct_Builder>deref(self.thisptr_child), parent)
 *         self.is_consumed = False             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->is_consumed = 0;

  /* "capnp/lib/capnp.pyx":2064
 *         self._init(<DynamicStruct_Builder>deref(self.thisptr_child), parent)
 *         self.is_consumed = False
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2060
 *     cdef public bint is_consumed
 * 
 *     cdef _init_child(self, Request other, parent):             # <<<<<<<<<<<<<<
 *         self.thisptr_child = new Request(moveRequest(other))
 *         self._init(<DynamicStruct_Builder>deref(self.thisptr_child), parent)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._Request._init_child", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2066
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr_child
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_8_Request_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_8_Request_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_8_Request___dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__Request *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_8_Request___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":2067
 * 
 *     def __dealloc__(self):
 *         del self.thisptr_child             # <<<<<<<<<<<<<<
 * 
 *     cpdef send(self):
 */
  delete __pyx_v_self->thisptr_child;

  /* "capnp/lib/capnp.pyx":2066
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr_child
 * 
 */

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

/* "capnp/lib/capnp.pyx":2069
 *         del self.thisptr_child
 * 
 *     cpdef send(self):             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Request has already been sent. You can only send a request once.')
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Request_3send(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_8_Request_send(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("send", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_send); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2069, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_8_Request_3send)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2069, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2070
 * 
 *     cpdef send(self):
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Request has already been sent. You can only send a request once.')
 *         self.is_consumed = True
 */
  __pyx_t_5 = (__pyx_v_self->is_consumed != 0);
  if (unlikely(__pyx_t_5)) {

    /* "capnp/lib/capnp.pyx":2071
 *     cpdef send(self):
 *         if self.is_consumed:
 *             raise KjException('Request has already been sent. You can only send a request once.')             # <<<<<<<<<<<<<<
 *         self.is_consumed = True
 *         return _RemotePromise()._init(self.thisptr_child.send(), self._parent)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Request_has_already_been_sent_Yo) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Request_has_already_been_sent_Yo);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2071, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":2070
 * 
 *     cpdef send(self):
 *         if self.is_consumed:             # <<<<<<<<<<<<<<
 *             raise KjException('Request has already been sent. You can only send a request once.')
 *         self.is_consumed = True
 */
  }

  /* "capnp/lib/capnp.pyx":2072
 *         if self.is_consumed:
 *             raise KjException('Request has already been sent. You can only send a request once.')
 *         self.is_consumed = True             # <<<<<<<<<<<<<<
 *         return _RemotePromise()._init(self.thisptr_child.send(), self._parent)
 * 
 */
  __pyx_v_self->is_consumed = 1;

  /* "capnp/lib/capnp.pyx":2073
 *             raise KjException('Request has already been sent. You can only send a request once.')
 *         self.is_consumed = True
 *         return _RemotePromise()._init(self.thisptr_child.send(), self._parent)             # <<<<<<<<<<<<<<
 * 
 * cdef class _Response(_DynamicStructReader):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__RemotePromise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_self->__pyx_base._parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__RemotePromise *)((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_t_1), __pyx_v_self->thisptr_child->send(), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2069
 *         del self.thisptr_child
 * 
 *     cpdef send(self):             # <<<<<<<<<<<<<<
 *         if self.is_consumed:
 *             raise KjException('Request has already been sent. You can only send a request once.')
 */

  /* 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("capnp.lib.capnp._Request.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Request_3send(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_8_Request_2send[] = "_Request.send(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Request_3send(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("send (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Request_2send(((struct __pyx_obj_5capnp_3lib_5capnp__Request *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Request_2send(struct __pyx_obj_5capnp_3lib_5capnp__Request *__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("send", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_8_Request_send(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2069, __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("capnp.lib.capnp._Request.send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2058
 * cdef class _Request(_DynamicStructBuilder):
 *     cdef Request * thisptr_child
 *     cdef public bint is_consumed             # <<<<<<<<<<<<<<
 * 
 *     cdef _init_child(self, Request other, parent):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Request_11is_consumed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_8_Request_11is_consumed_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Request_11is_consumed___get__(((struct __pyx_obj_5capnp_3lib_5capnp__Request *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_8_Request_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_consumed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2058, __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("capnp.lib.capnp._Request.is_consumed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_8_Request_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_8_Request_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_8_Request_11is_consumed_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__Request *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_8_Request_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2058, __pyx_L1_error)
  __pyx_v_self->is_consumed = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Request.is_consumed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2078
 *     cdef Response * thisptr_child
 * 
 *     cdef _init_child(self, Response other, parent):             # <<<<<<<<<<<<<<
 *         self.thisptr_child = new Response(moveResponse(other))
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_9_Response__init_child(struct __pyx_obj_5capnp_3lib_5capnp__Response *__pyx_v_self,  ::capnp::Response< ::capnp::DynamicStruct> __pyx_v_other, PyObject *__pyx_v_parent) {
  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("_init_child", 0);

  /* "capnp/lib/capnp.pyx":2079
 * 
 *     cdef _init_child(self, Response other, parent):
 *         self.thisptr_child = new Response(moveResponse(other))             # <<<<<<<<<<<<<<
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)
 *         return self
 */
  __pyx_v_self->thisptr_child = new  ::capnp::Response< ::capnp::DynamicStruct>(std::move(__pyx_v_other));

  /* "capnp/lib/capnp.pyx":2080
 *     cdef _init_child(self, Response other, parent):
 *         self.thisptr_child = new Response(moveResponse(other))
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Response *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), (( ::capnp::DynamicStruct::Reader)(*__pyx_v_self->thisptr_child)), __pyx_v_parent, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2081
 *         self.thisptr_child = new Response(moveResponse(other))
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2078
 *     cdef Response * thisptr_child
 * 
 *     cdef _init_child(self, Response other, parent):             # <<<<<<<<<<<<<<
 *         self.thisptr_child = new Response(moveResponse(other))
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._Response._init_child", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2083
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr_child
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_9_Response_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_9_Response_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_9_Response___dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__Response *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_9_Response___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__Response *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":2084
 * 
 *     def __dealloc__(self):
 *         del self.thisptr_child             # <<<<<<<<<<<<<<
 * 
 *     cdef _init_childptr(self, Response * other, parent):
 */
  delete __pyx_v_self->thisptr_child;

  /* "capnp/lib/capnp.pyx":2083
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr_child
 * 
 */

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

/* "capnp/lib/capnp.pyx":2086
 *         del self.thisptr_child
 * 
 *     cdef _init_childptr(self, Response * other, parent):             # <<<<<<<<<<<<<<
 *         self.thisptr_child = other
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_9_Response__init_childptr(struct __pyx_obj_5capnp_3lib_5capnp__Response *__pyx_v_self,  ::capnp::Response< ::capnp::DynamicStruct> *__pyx_v_other, PyObject *__pyx_v_parent) {
  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("_init_childptr", 0);

  /* "capnp/lib/capnp.pyx":2087
 * 
 *     cdef _init_childptr(self, Response * other, parent):
 *         self.thisptr_child = other             # <<<<<<<<<<<<<<
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)
 *         return self
 */
  __pyx_v_self->thisptr_child = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2088
 *     cdef _init_childptr(self, Response * other, parent):
 *         self.thisptr_child = other
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Response *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_self), (( ::capnp::DynamicStruct::Reader)(*__pyx_v_self->thisptr_child)), __pyx_v_parent, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2089
 *         self.thisptr_child = other
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)
 *         return self             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicCapabilityServer:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2086
 *         del self.thisptr_child
 * 
 *     cdef _init_childptr(self, Response * other, parent):             # <<<<<<<<<<<<<<
 *         self.thisptr_child = other
 *         self._init(<C_DynamicStruct.Reader>deref(self.thisptr_child), parent)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._Response._init_childptr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2095
 *     cdef public object server
 * 
 *     def __init__(self, schema, server):             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_server = 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_schema,&__pyx_n_s_server,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_server)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2095, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2095, __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_schema = values[0];
    __pyx_v_server = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2095, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityServer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer___init__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self), __pyx_v_schema, __pyx_v_server);

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer___init__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_server) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_s = 0;
  int __pyx_r;
  __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("__init__", 0);

  /* "capnp/lib/capnp.pyx":2097
 *     def __init__(self, schema, server):
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2097, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2098
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2098, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2098, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":2097
 *     def __init__(self, schema, server):
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":2100
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         self.schema = s
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2100, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":2102
 *             s = schema
 * 
 *         self.schema = s             # <<<<<<<<<<<<<<
 *         self.server = server
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_s));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_s));
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->schema));
  __pyx_v_self->schema = __pyx_v_s;

  /* "capnp/lib/capnp.pyx":2103
 * 
 *         self.schema = s
 *         self.server = server             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, field):
 */
  __Pyx_INCREF(__pyx_v_server);
  __Pyx_GIVEREF(__pyx_v_server);
  __Pyx_GOTREF(__pyx_v_self->server);
  __Pyx_DECREF(__pyx_v_self->server);
  __pyx_v_self->server = __pyx_v_server;

  /* "capnp/lib/capnp.pyx":2095
 *     cdef public object server
 * 
 *     def __init__(self, schema, server):             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityServer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2105
 *         self.server = server
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return getattr(self.server, field)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_2__getattr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self), ((PyObject *)__pyx_v_field));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_2__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v_field) {
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "capnp/lib/capnp.pyx":2106
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return getattr(self.server, field)
 *         except KjException as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":2107
 *     def __getattr__(self, field):
 *         try:
 *             return getattr(self.server, field)             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __pyx_v_self->server;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetAttr(__pyx_t_4, __pyx_v_field); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2107, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":2106
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return getattr(self.server, field)
 *         except KjException as e:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":2108
 *         try:
 *             return getattr(self.server, field)
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 */
    __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_KjException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2108, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_5, __pyx_t_7);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_6);
    __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_6 = 0;
    if (__pyx_t_8) {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityServer.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 2108, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_e = __pyx_t_4;

      /* "capnp/lib/capnp.pyx":2109
 *             return getattr(self.server, field)
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]             # <<<<<<<<<<<<<<
 * 
 * cdef class _DynamicCapabilityClient:
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_to_python); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2109, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
        }
      }
      __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2109, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_sys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2109, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2109, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
        }
      }
      __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2109, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_9, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2109, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_Raise(__pyx_t_7, Py_None, __pyx_t_11, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(0, 2109, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":2106
 * 
 *     def __getattr__(self, field):
 *         try:             # <<<<<<<<<<<<<<
 *             return getattr(self.server, field)
 *         except KjException as e:
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":2105
 *         self.server = server
 * 
 *     def __getattr__(self, field):             # <<<<<<<<<<<<<<
 *         try:
 *             return getattr(self.server, field)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityServer.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2092
 * 
 * cdef class _DynamicCapabilityServer:
 *     cdef public _InterfaceSchema schema             # <<<<<<<<<<<<<<
 *     cdef public object server
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->schema));
  __pyx_r = ((PyObject *)__pyx_v_self->schema);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2092, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->schema));
  __pyx_v_self->schema = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityServer.schema.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->schema));
  __pyx_v_self->schema = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)Py_None);

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

/* "capnp/lib/capnp.pyx":2093
 * cdef class _DynamicCapabilityServer:
 *     cdef public _InterfaceSchema schema
 *     cdef public object server             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, schema, server):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->server);
  __pyx_r = __pyx_v_self->server;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->server);
  __Pyx_DECREF(__pyx_v_self->server);
  __pyx_v_self->server = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->server);
  __Pyx_DECREF(__pyx_v_self->server);
  __pyx_v_self->server = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityServer_4__reduce_cython__[] = "_DynamicCapabilityServer.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_4__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  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("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self.schema, self.server)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->schema));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->schema));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->schema));
  __Pyx_INCREF(__pyx_v_self->server);
  __Pyx_GIVEREF(__pyx_v_self->server);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->server);
  __pyx_v_state = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self.schema, self.server)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = (self.schema, self.server)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self.schema is not None or self.server is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self.schema, self.server)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self.schema is not None or self.server is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, None), state
 */
  /*else*/ {
    __pyx_t_2 = (((PyObject *)__pyx_v_self->schema) != Py_None);
    __pyx_t_5 = (__pyx_t_2 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_3 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->server != Py_None);
    __pyx_t_2 = (__pyx_t_5 != 0);
    __pyx_t_3 = __pyx_t_2;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_3;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.schema is not None or self.server is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = self.schema is not None or self.server is not None
 *     if use_setstate:
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle__DynamicCapabilit); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_88241323);
    __Pyx_GIVEREF(__pyx_int_88241323);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_88241323);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self.schema is not None or self.server is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, None), state
 *     else:
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__DynamicCapabilityServer__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle__DynamicCapabilit); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_88241323);
    __Pyx_GIVEREF(__pyx_int_88241323);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_88241323);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityServer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__DynamicCapabilityServer__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6__setstate_cython__[] = "_DynamicCapabilityServer.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__DynamicCapabilityServer__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicCapabilityServer__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__DynamicCapabilityServer, (type(self), 0x54274ab, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__DynamicCapabilityServer__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityServer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2115
 *     cdef public object _server, _parent, _cached_schema
 * 
 *     cdef _init(self, C_DynamicCapability.Client other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__init(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self,  ::capnp::DynamicCapability::Client __pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":2116
 * 
 *     cdef _init(self, C_DynamicCapability.Client other, object parent):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2117
 *     cdef _init(self, C_DynamicCapability.Client other, object parent):
 *         self.thisptr = other
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":2118
 *         self.thisptr = other
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef _init_vals(self, schema, server):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2115
 *     cdef public object _server, _parent, _cached_schema
 * 
 *     cdef _init(self, C_DynamicCapability.Client other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":2120
 *         return self
 * 
 *     cdef _init_vals(self, schema, server):             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__init_vals(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_server) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_s = 0;
  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("_init_vals", 0);

  /* "capnp/lib/capnp.pyx":2122
 *     cdef _init_vals(self, schema, server):
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_1 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2122, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2123
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2123, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":2122
 *     cdef _init_vals(self, schema, server):
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":2125
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         self.thisptr = helpers.new_client(s.thisptr, <PyObject *>server)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2125, __pyx_L1_error)
    __pyx_t_3 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":2127
 *             s = schema
 * 
 *         self.thisptr = helpers.new_client(s.thisptr, <PyObject *>server)             # <<<<<<<<<<<<<<
 *         self._server = server
 *         return self
 */
  __pyx_v_self->thisptr = new_client(__pyx_v_s->thisptr, ((PyObject *)__pyx_v_server));

  /* "capnp/lib/capnp.pyx":2128
 * 
 *         self.thisptr = helpers.new_client(s.thisptr, <PyObject *>server)
 *         self._server = server             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_server);
  __Pyx_GIVEREF(__pyx_v_server);
  __Pyx_GOTREF(__pyx_v_self->_server);
  __Pyx_DECREF(__pyx_v_self->_server);
  __pyx_v_self->_server = __pyx_v_server;

  /* "capnp/lib/capnp.pyx":2129
 *         self.thisptr = helpers.new_client(s.thisptr, <PyObject *>server)
 *         self._server = server
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef _find_method_args(self, method_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2120
 *         return self
 * 
 *     cdef _init_vals(self, schema, server):             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._init_vals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2131
 *         return self
 * 
 *     cpdef _find_method_args(self, method_name):             # <<<<<<<<<<<<<<
 *         s = self.schema
 *         meth = s.methods_inherited.get(method_name, None)
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_1_find_method_args(PyObject *__pyx_v_self, PyObject *__pyx_v_method_name); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__find_method_args(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_method_name, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_meth = NULL;
  PyObject *__pyx_v_params = 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_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_find_method_args", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_find_method_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_1_find_method_args)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_method_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_method_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2132
 * 
 *     cpdef _find_method_args(self, method_name):
 *         s = self.schema             # <<<<<<<<<<<<<<
 *         meth = s.methods_inherited.get(method_name, None)
 *         if meth is None:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_s = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2133
 *     cpdef _find_method_args(self, method_name):
 *         s = self.schema
 *         meth = s.methods_inherited.get(method_name, None)             # <<<<<<<<<<<<<<
 *         if meth is None:
 *             raise AttributeError("Method named %s not found." % method_name)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_methods_inherited); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_method_name, Py_None};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_method_name, Py_None};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_method_name);
    __Pyx_GIVEREF(__pyx_v_method_name);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_method_name);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, Py_None);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_meth = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2134
 *         s = self.schema
 *         meth = s.methods_inherited.get(method_name, None)
 *         if meth is None:             # <<<<<<<<<<<<<<
 *             raise AttributeError("Method named %s not found." % method_name)
 * 
 */
  __pyx_t_6 = (__pyx_v_meth == Py_None);
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (unlikely(__pyx_t_7)) {

    /* "capnp/lib/capnp.pyx":2135
 *         meth = s.methods_inherited.get(method_name, None)
 *         if meth is None:
 *             raise AttributeError("Method named %s not found." % method_name)             # <<<<<<<<<<<<<<
 * 
 *         params = meth.param_type.node
 */
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Method_named_s_not_found, __pyx_v_method_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2135, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":2134
 *         s = self.schema
 *         meth = s.methods_inherited.get(method_name, None)
 *         if meth is None:             # <<<<<<<<<<<<<<
 *             raise AttributeError("Method named %s not found." % method_name)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":2137
 *             raise AttributeError("Method named %s not found." % method_name)
 * 
 *         params = meth.param_type.node             # <<<<<<<<<<<<<<
 *         if params.scopeId != 0:
 *             raise KjException("Cannot call method `%s` with positional args, since its param struct is not implicitly defined and thus does not have a set order of arguments" % method_name)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_meth, __pyx_n_s_param_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_params = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2138
 * 
 *         params = meth.param_type.node
 *         if params.scopeId != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("Cannot call method `%s` with positional args, since its param struct is not implicitly defined and thus does not have a set order of arguments" % method_name)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_scopeId); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_NeObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_7)) {

    /* "capnp/lib/capnp.pyx":2139
 *         params = meth.param_type.node
 *         if params.scopeId != 0:
 *             raise KjException("Cannot call method `%s` with positional args, since its param struct is not implicitly defined and thus does not have a set order of arguments" % method_name)             # <<<<<<<<<<<<<<
 * 
 *         return _find_field_order(params.struct)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_KjException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_call_method_s_with_positi, __pyx_v_method_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2139, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":2138
 * 
 *         params = meth.param_type.node
 *         if params.scopeId != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("Cannot call method `%s` with positional args, since its param struct is not implicitly defined and thus does not have a set order of arguments" % method_name)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":2141
 *             raise KjException("Cannot call method `%s` with positional args, since its param struct is not implicitly defined and thus does not have a set order of arguments" % method_name)
 * 
 *         return _find_field_order(params.struct)             # <<<<<<<<<<<<<<
 * 
 *     cdef _set_fields(self, Request * request, name, args, kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_params, __pyx_n_s_struct); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp__find_field_order(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2131
 *         return self
 * 
 *     cpdef _find_method_args(self, method_name):             # <<<<<<<<<<<<<<
 *         s = self.schema
 *         meth = s.methods_inherited.get(method_name, None)
 */

  /* 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("capnp.lib.capnp._DynamicCapabilityClient._find_method_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_meth);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_1_find_method_args(PyObject *__pyx_v_self, PyObject *__pyx_v_method_name); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient__find_method_args[] = "_DynamicCapabilityClient._find_method_args(self, method_name)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_1_find_method_args(PyObject *__pyx_v_self, PyObject *__pyx_v_method_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_find_method_args (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient__find_method_args(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v_method_name));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient__find_method_args(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_method_name) {
  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("_find_method_args", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__find_method_args(__pyx_v_self, __pyx_v_method_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2131, __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("capnp.lib.capnp._DynamicCapabilityClient._find_method_args", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2143
 *         return _find_field_order(params.struct)
 * 
 *     cdef _set_fields(self, Request * request, name, args, kwargs):             # <<<<<<<<<<<<<<
 *         if args is not None and len(args) > 0:
 *             arg_names = self._find_method_args(name)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__set_fields(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self,  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct> *__pyx_v_request, PyObject *__pyx_v_name, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_arg_names = NULL;
  PyObject *__pyx_v_arg_name = NULL;
  PyObject *__pyx_v_arg_val = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set_fields", 0);

  /* "capnp/lib/capnp.pyx":2144
 * 
 *     cdef _set_fields(self, Request * request, name, args, kwargs):
 *         if args is not None and len(args) > 0:             # <<<<<<<<<<<<<<
 *             arg_names = self._find_method_args(name)
 *             if len(args) > len(arg_names):
 */
  __pyx_t_2 = (__pyx_v_args != Py_None);
  __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_4 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2144, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_4 > 0) != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":2145
 *     cdef _set_fields(self, Request * request, name, args, kwargs):
 *         if args is not None and len(args) > 0:
 *             arg_names = self._find_method_args(name)             # <<<<<<<<<<<<<<
 *             if len(args) > len(arg_names):
 *                 raise KjException('Too many arguments passed to `%s`. Expected %d and got %d' % (name, len(arg_names), len(args)))
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self->__pyx_vtab)->_find_method_args(__pyx_v_self, __pyx_v_name, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_arg_names = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":2146
 *         if args is not None and len(args) > 0:
 *             arg_names = self._find_method_args(name)
 *             if len(args) > len(arg_names):             # <<<<<<<<<<<<<<
 *                 raise KjException('Too many arguments passed to `%s`. Expected %d and got %d' % (name, len(arg_names), len(args)))
 *             for arg_name, arg_val in zip(arg_names, args):
 */
    __pyx_t_4 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2146, __pyx_L1_error)
    __pyx_t_6 = PyObject_Length(__pyx_v_arg_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2146, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_4 > __pyx_t_6) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "capnp/lib/capnp.pyx":2147
 *             arg_names = self._find_method_args(name)
 *             if len(args) > len(arg_names):
 *                 raise KjException('Too many arguments passed to `%s`. Expected %d and got %d' % (name, len(arg_names), len(args)))             # <<<<<<<<<<<<<<
 *             for arg_name, arg_val in zip(arg_names, args):
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), arg_name, arg_val, self)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_KjException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyObject_Length(__pyx_v_arg_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2147, __pyx_L1_error)
      __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_6 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2147, __pyx_L1_error)
      __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_name);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_9);
      __pyx_t_8 = 0;
      __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Too_many_arguments_passed_to_s_E, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 2147, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":2146
 *         if args is not None and len(args) > 0:
 *             arg_names = self._find_method_args(name)
 *             if len(args) > len(arg_names):             # <<<<<<<<<<<<<<
 *                 raise KjException('Too many arguments passed to `%s`. Expected %d and got %d' % (name, len(arg_names), len(args)))
 *             for arg_name, arg_val in zip(arg_names, args):
 */
    }

    /* "capnp/lib/capnp.pyx":2148
 *             if len(args) > len(arg_names):
 *                 raise KjException('Too many arguments passed to `%s`. Expected %d and got %d' % (name, len(arg_names), len(args)))
 *             for arg_name, arg_val in zip(arg_names, args):             # <<<<<<<<<<<<<<
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), arg_name, arg_val, self)
 * 
 */
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_arg_names);
    __Pyx_GIVEREF(__pyx_v_arg_names);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_arg_names);
    __Pyx_INCREF(__pyx_v_args);
    __Pyx_GIVEREF(__pyx_v_args);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_args);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
      __pyx_t_5 = __pyx_t_7; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2148, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2148, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2148, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2148, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2148, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_11(__pyx_t_5);
        if (unlikely(!__pyx_t_7)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2148, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
        PyObject* sequence = __pyx_t_7;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2148, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        #endif
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2148, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_9)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_10)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_10);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2148, __pyx_L1_error)
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L10_unpacking_done;
        __pyx_L9_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2148, __pyx_L1_error)
        __pyx_L10_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_arg_name, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_arg_val, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "capnp/lib/capnp.pyx":2149
 *                 raise KjException('Too many arguments passed to `%s`. Expected %d and got %d' % (name, len(arg_names), len(args)))
 *             for arg_name, arg_val in zip(arg_names, args):
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), arg_name, arg_val, self)             # <<<<<<<<<<<<<<
 * 
 *         if kwargs is not None:
 */
      __pyx_t_7 = __pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setDynamicField((( ::capnp::DynamicStruct::Builder)(*__pyx_v_request)), __pyx_v_arg_name, __pyx_v_arg_val, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":2148
 *             if len(args) > len(arg_names):
 *                 raise KjException('Too many arguments passed to `%s`. Expected %d and got %d' % (name, len(arg_names), len(args)))
 *             for arg_name, arg_val in zip(arg_names, args):             # <<<<<<<<<<<<<<
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), arg_name, arg_val, self)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":2144
 * 
 *     cdef _set_fields(self, Request * request, name, args, kwargs):
 *         if args is not None and len(args) > 0:             # <<<<<<<<<<<<<<
 *             arg_names = self._find_method_args(name)
 *             if len(args) > len(arg_names):
 */
  }

  /* "capnp/lib/capnp.pyx":2151
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), arg_name, arg_val, self)
 * 
 *         if kwargs is not None:             # <<<<<<<<<<<<<<
 *             for key, val in kwargs.items():
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), key, val, self)
 */
  __pyx_t_1 = (__pyx_v_kwargs != Py_None);
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":2152
 * 
 *         if kwargs is not None:
 *             for key, val in kwargs.items():             # <<<<<<<<<<<<<<
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), key, val, self)
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwargs, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_7 = __pyx_t_5; __Pyx_INCREF(__pyx_t_7); __pyx_t_6 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_11 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2152, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2152, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2152, __pyx_L1_error)
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_11(__pyx_t_7);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2152, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2152, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_9);
        #else
        __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext;
        index = 0; __pyx_t_10 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_10)) goto __pyx_L14_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_10);
        index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_9)) goto __pyx_L14_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2152, __pyx_L1_error)
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L15_unpacking_done;
        __pyx_L14_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2152, __pyx_L1_error)
        __pyx_L15_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "capnp/lib/capnp.pyx":2153
 *         if kwargs is not None:
 *             for key, val in kwargs.items():
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), key, val, self)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _send_helper(self, name, word_count, args, kwargs) except +reraise_kj_exception:
 */
      __pyx_t_5 = __pyx_fuse_1__pyx_f_5capnp_3lib_5capnp__setDynamicField((( ::capnp::DynamicStruct::Builder)(*__pyx_v_request)), __pyx_v_key, __pyx_v_val, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "capnp/lib/capnp.pyx":2152
 * 
 *         if kwargs is not None:
 *             for key, val in kwargs.items():             # <<<<<<<<<<<<<<
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), key, val, self)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "capnp/lib/capnp.pyx":2151
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), arg_name, arg_val, self)
 * 
 *         if kwargs is not None:             # <<<<<<<<<<<<<<
 *             for key, val in kwargs.items():
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), key, val, self)
 */
  }

  /* "capnp/lib/capnp.pyx":2143
 *         return _find_field_order(params.struct)
 * 
 *     cdef _set_fields(self, Request * request, name, args, kwargs):             # <<<<<<<<<<<<<<
 *         if args is not None and len(args) > 0:
 *             arg_names = self._find_method_args(name)
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._set_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_arg_names);
  __Pyx_XDECREF(__pyx_v_arg_name);
  __Pyx_XDECREF(__pyx_v_arg_val);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2155
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), key, val, self)
 * 
 *     cpdef _send_helper(self, name, word_count, args, kwargs) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         # if word_count is None:
 *         #     word_count = 0
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_3_send_helper(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__send_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_word_count, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
   ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct> *__pyx_v_request;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_send_helper", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_send_helper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_3_send_helper)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_name, __pyx_v_word_count, __pyx_v_args, __pyx_v_kwargs};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2155, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_name, __pyx_v_word_count, __pyx_v_args, __pyx_v_kwargs};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2155, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2155, __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(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_word_count);
          __Pyx_GIVEREF(__pyx_v_word_count);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_word_count);
          __Pyx_INCREF(__pyx_v_args);
          __Pyx_GIVEREF(__pyx_v_args);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_args);
          __Pyx_INCREF(__pyx_v_kwargs);
          __Pyx_GIVEREF(__pyx_v_kwargs);
          PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_kwargs);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2155, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2158
 *         # if word_count is None:
 *         #     word_count = 0
 *         cdef Request * request = new Request(self.thisptr.newRequest(name)) # TODO: pass word_count             # <<<<<<<<<<<<<<
 * 
 *         self._set_fields(request, name, args, kwargs)
 */
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2158, __pyx_L1_error)
  __pyx_v_request = new  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct>(__pyx_v_self->thisptr.newRequest(__pyx_t_7));

  /* "capnp/lib/capnp.pyx":2160
 *         cdef Request * request = new Request(self.thisptr.newRequest(name)) # TODO: pass word_count
 * 
 *         self._set_fields(request, name, args, kwargs)             # <<<<<<<<<<<<<<
 * 
 *         return _RemotePromise()._init(request.send(), self)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self->__pyx_vtab)->_set_fields(__pyx_v_self, __pyx_v_request, __pyx_v_name, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2162
 *         self._set_fields(request, name, args, kwargs)
 * 
 *         return _RemotePromise()._init(request.send(), self)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _request_helper(self, name, firstSegmentWordSize, args, kwargs) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__RemotePromise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__RemotePromise *)((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)__pyx_t_1), __pyx_v_request->send(), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2162, __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;

  /* "capnp/lib/capnp.pyx":2155
 *                 _setDynamicField(<DynamicStruct_Builder>deref(request), key, val, self)
 * 
 *     cpdef _send_helper(self, name, word_count, args, kwargs) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         # if word_count is None:
 *         #     word_count = 0
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._send_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_3_send_helper(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_2_send_helper[] = "_DynamicCapabilityClient._send_helper(self, name, word_count, args, kwargs)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_3_send_helper(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_word_count = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_send_helper (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_word_count,&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
    PyObject* values[4] = {0,0,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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_word_count)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_send_helper", 1, 4, 4, 1); __PYX_ERR(0, 2155, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_send_helper", 1, 4, 4, 2); __PYX_ERR(0, 2155, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_send_helper", 1, 4, 4, 3); __PYX_ERR(0, 2155, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_send_helper") < 0)) __PYX_ERR(0, 2155, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_name = values[0];
    __pyx_v_word_count = values[1];
    __pyx_v_args = values[2];
    __pyx_v_kwargs = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_send_helper", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2155, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._send_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_2_send_helper(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), __pyx_v_name, __pyx_v_word_count, __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_2_send_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_word_count, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  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("_send_helper", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__send_helper(__pyx_v_self, __pyx_v_name, __pyx_v_word_count, __pyx_v_args, __pyx_v_kwargs, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2155, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2155, __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("capnp.lib.capnp._DynamicCapabilityClient._send_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2164
 *         return _RemotePromise()._init(request.send(), self)
 * 
 *     cpdef _request_helper(self, name, firstSegmentWordSize, args, kwargs) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         # if word_count is None:
 *         #     word_count = 0
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_5_request_helper(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__request_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_firstSegmentWordSize, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__Request *__pyx_v_req = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_request_helper", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_request_helper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_5_request_helper)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_name, __pyx_v_firstSegmentWordSize, __pyx_v_args, __pyx_v_kwargs};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2164, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_name, __pyx_v_firstSegmentWordSize, __pyx_v_args, __pyx_v_kwargs};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2164, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2164, __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(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_firstSegmentWordSize);
          __Pyx_GIVEREF(__pyx_v_firstSegmentWordSize);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_firstSegmentWordSize);
          __Pyx_INCREF(__pyx_v_args);
          __Pyx_GIVEREF(__pyx_v_args);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_args);
          __Pyx_INCREF(__pyx_v_kwargs);
          __Pyx_GIVEREF(__pyx_v_kwargs);
          PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_kwargs);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2164, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2167
 *         # if word_count is None:
 *         #     word_count = 0
 *         cdef _Request req = _Request()._init_child(self.thisptr.newRequest(name), self)             # <<<<<<<<<<<<<<
 * 
 *         self._set_fields(req.thisptr_child, name, args, kwargs)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Request)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_name); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2167, __pyx_L1_error)
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Request *)((struct __pyx_obj_5capnp_3lib_5capnp__Request *)__pyx_t_1)->__pyx_base.__pyx_vtab)->_init_child(((struct __pyx_obj_5capnp_3lib_5capnp__Request *)__pyx_t_1), __pyx_v_self->thisptr.newRequest(__pyx_t_7), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5capnp_3lib_5capnp__Request))))) __PYX_ERR(0, 2167, __pyx_L1_error)
  __pyx_v_req = ((struct __pyx_obj_5capnp_3lib_5capnp__Request *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2169
 *         cdef _Request req = _Request()._init_child(self.thisptr.newRequest(name), self)
 * 
 *         self._set_fields(req.thisptr_child, name, args, kwargs)             # <<<<<<<<<<<<<<
 * 
 *         return req
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self->__pyx_vtab)->_set_fields(__pyx_v_self, __pyx_v_req->thisptr_child, __pyx_v_name, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2171
 *         self._set_fields(req.thisptr_child, name, args, kwargs)
 * 
 *         return req             # <<<<<<<<<<<<<<
 * 
 *     def _request(self, name, *args, word_count=None, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_req));
  __pyx_r = ((PyObject *)__pyx_v_req);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2164
 *         return _RemotePromise()._init(request.send(), self)
 * 
 *     cpdef _request_helper(self, name, firstSegmentWordSize, args, kwargs) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         # if word_count is None:
 *         #     word_count = 0
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._request_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_req);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_5_request_helper(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_4_request_helper[] = "_DynamicCapabilityClient._request_helper(self, name, firstSegmentWordSize, args, kwargs)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_5_request_helper(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_firstSegmentWordSize = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_request_helper (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_firstSegmentWordSize,&__pyx_n_s_args,&__pyx_n_s_kwargs,0};
    PyObject* values[4] = {0,0,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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_firstSegmentWordSize)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_request_helper", 1, 4, 4, 1); __PYX_ERR(0, 2164, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_request_helper", 1, 4, 4, 2); __PYX_ERR(0, 2164, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_request_helper", 1, 4, 4, 3); __PYX_ERR(0, 2164, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_request_helper") < 0)) __PYX_ERR(0, 2164, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_name = values[0];
    __pyx_v_firstSegmentWordSize = values[1];
    __pyx_v_args = values[2];
    __pyx_v_kwargs = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_request_helper", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2164, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._request_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_4_request_helper(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), __pyx_v_name, __pyx_v_firstSegmentWordSize, __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_4_request_helper(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_firstSegmentWordSize, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  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("_request_helper", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__request_helper(__pyx_v_self, __pyx_v_name, __pyx_v_firstSegmentWordSize, __pyx_v_args, __pyx_v_kwargs, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2164, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2164, __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("capnp.lib.capnp._DynamicCapabilityClient._request_helper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2173
 *         return req
 * 
 *     def _request(self, name, *args, word_count=None, **kwargs):             # <<<<<<<<<<<<<<
 *         return self._request_helper(name, word_count, args, kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_request(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6_request[] = "_DynamicCapabilityClient._request(self, name, *args, word_count=None, **kwargs)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_request(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_word_count = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_request (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_word_count,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) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (kw_args == 1) {
        const Py_ssize_t index = 1;
        PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
        if (value) { values[index] = value; kw_args--; }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "_request") < 0)) __PYX_ERR(0, 2173, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_name = values[0];
    __pyx_v_word_count = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_request", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2173, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._request", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6_request(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), __pyx_v_name, __pyx_v_word_count, __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6_request(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_word_count, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  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("_request", 0);

  /* "capnp/lib/capnp.pyx":2174
 * 
 *     def _request(self, name, *args, word_count=None, **kwargs):
 *         return self._request_helper(name, word_count, args, kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def _send(self, name, *args, word_count=None, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self->__pyx_vtab)->_request_helper(__pyx_v_self, __pyx_v_name, __pyx_v_word_count, __pyx_v_args, __pyx_v_kwargs, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2174, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2174, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2173
 *         return req
 * 
 *     def _request(self, name, *args, word_count=None, **kwargs):             # <<<<<<<<<<<<<<
 *         return self._request_helper(name, word_count, args, kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._request", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2176
 *         return self._request_helper(name, word_count, args, kwargs)
 * 
 *     def _send(self, name, *args, word_count=None, **kwargs):             # <<<<<<<<<<<<<<
 *         return self._send_helper(name, word_count, args, kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_9_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_8_send[] = "_DynamicCapabilityClient._send(self, name, *args, word_count=None, **kwargs)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_9_send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_word_count = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_send (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_word_count,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) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (kw_args == 1) {
        const Py_ssize_t index = 1;
        PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
        if (value) { values[index] = value; kw_args--; }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "_send") < 0)) __PYX_ERR(0, 2176, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_name = values[0];
    __pyx_v_word_count = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_send", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2176, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_8_send(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), __pyx_v_name, __pyx_v_word_count, __pyx_v_args, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_8_send(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_word_count, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  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("_send", 0);

  /* "capnp/lib/capnp.pyx":2177
 * 
 *     def _send(self, name, *args, word_count=None, **kwargs):
 *         return self._send_helper(name, word_count, args, kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self->__pyx_vtab)->_send_helper(__pyx_v_self, __pyx_v_name, __pyx_v_word_count, __pyx_v_args, __pyx_v_kwargs, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2177, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2177, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2176
 *         return self._request_helper(name, word_count, args, kwargs)
 * 
 *     def _send(self, name, *args, word_count=None, **kwargs):             # <<<<<<<<<<<<<<
 *         return self._send_helper(name, word_count, args, kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient._send", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2179
 *         return self._send_helper(name, word_count, args, kwargs)
 * 
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         try:
 *             if name.endswith('_request'):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_11__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_11__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_10__getattr__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_10__getattr__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_short_name = NULL;
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "capnp/lib/capnp.pyx":2180
 * 
 *     def __getattr__(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             if name.endswith('_request'):
 *                 short_name = name[:-8]
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":2181
 *     def __getattr__(self, name):
 *         try:
 *             if name.endswith('_request'):             # <<<<<<<<<<<<<<
 *                 short_name = name[:-8]
 *                 if short_name not in self.schema.method_names_inherited:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2181, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && 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_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_request) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_request);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2181, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2181, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_7) {

        /* "capnp/lib/capnp.pyx":2182
 *         try:
 *             if name.endswith('_request'):
 *                 short_name = name[:-8]             # <<<<<<<<<<<<<<
 *                 if short_name not in self.schema.method_names_inherited:
 *                     raise AttributeError('Method named %s not found' % short_name)
 */
        __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, -8L, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2182, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_v_short_name = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "capnp/lib/capnp.pyx":2183
 *             if name.endswith('_request'):
 *                 short_name = name[:-8]
 *                 if short_name not in self.schema.method_names_inherited:             # <<<<<<<<<<<<<<
 *                     raise AttributeError('Method named %s not found' % short_name)
 *                 return _partial(self._request, short_name)
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2183, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_method_names_inherited); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2183, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_short_name, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2183, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_8 = (__pyx_t_7 != 0);
        if (unlikely(__pyx_t_8)) {

          /* "capnp/lib/capnp.pyx":2184
 *                 short_name = name[:-8]
 *                 if short_name not in self.schema.method_names_inherited:
 *                     raise AttributeError('Method named %s not found' % short_name)             # <<<<<<<<<<<<<<
 *                 return _partial(self._request, short_name)
 * 
 */
          __pyx_t_5 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Method_named_s_not_found_2, __pyx_v_short_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2184, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2184, __pyx_L3_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_ERR(0, 2184, __pyx_L3_error)

          /* "capnp/lib/capnp.pyx":2183
 *             if name.endswith('_request'):
 *                 short_name = name[:-8]
 *                 if short_name not in self.schema.method_names_inherited:             # <<<<<<<<<<<<<<
 *                     raise AttributeError('Method named %s not found' % short_name)
 *                 return _partial(self._request, short_name)
 */
        }

        /* "capnp/lib/capnp.pyx":2185
 *                 if short_name not in self.schema.method_names_inherited:
 *                     raise AttributeError('Method named %s not found' % short_name)
 *                 return _partial(self._request, short_name)             # <<<<<<<<<<<<<<
 * 
 *             if name not in self.schema.method_names_inherited:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2185, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_request); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2185, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(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);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_v_short_name};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2185, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_v_short_name};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2185, __pyx_L3_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2185, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (__pyx_t_9) {
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_6);
          __Pyx_INCREF(__pyx_v_short_name);
          __Pyx_GIVEREF(__pyx_v_short_name);
          PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_short_name);
          __pyx_t_6 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2185, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L7_try_return;

        /* "capnp/lib/capnp.pyx":2181
 *     def __getattr__(self, name):
 *         try:
 *             if name.endswith('_request'):             # <<<<<<<<<<<<<<
 *                 short_name = name[:-8]
 *                 if short_name not in self.schema.method_names_inherited:
 */
      }

      /* "capnp/lib/capnp.pyx":2187
 *                 return _partial(self._request, short_name)
 * 
 *             if name not in self.schema.method_names_inherited:             # <<<<<<<<<<<<<<
 *                 raise AttributeError('Method named %s not found' % name)
 *             return _partial(self._send, name)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2187, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_method_names_inherited); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2187, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2187, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = (__pyx_t_8 != 0);
      if (unlikely(__pyx_t_7)) {

        /* "capnp/lib/capnp.pyx":2188
 * 
 *             if name not in self.schema.method_names_inherited:
 *                 raise AttributeError('Method named %s not found' % name)             # <<<<<<<<<<<<<<
 *             return _partial(self._send, name)
 *         except KjException as e:
 */
        __pyx_t_5 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Method_named_s_not_found_2, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2188, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2188, __pyx_L3_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_ERR(0, 2188, __pyx_L3_error)

        /* "capnp/lib/capnp.pyx":2187
 *                 return _partial(self._request, short_name)
 * 
 *             if name not in self.schema.method_names_inherited:             # <<<<<<<<<<<<<<
 *                 raise AttributeError('Method named %s not found' % name)
 *             return _partial(self._send, name)
 */
      }

      /* "capnp/lib/capnp.pyx":2189
 *             if name not in self.schema.method_names_inherited:
 *                 raise AttributeError('Method named %s not found' % name)
 *             return _partial(self._send, name)             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_partial); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2189, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_send_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2189, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_6 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && 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_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_11, __pyx_v_name};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_11, __pyx_v_name};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L3_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2189, __pyx_L3_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_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_11);
        __Pyx_INCREF(__pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_v_name);
        __pyx_t_11 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":2180
 * 
 *     def __getattr__(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             if name.endswith('_request'):
 *                 short_name = name[:-8]
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "capnp/lib/capnp.pyx":2190
 *                 raise AttributeError('Method named %s not found' % name)
 *             return _partial(self._send, name)
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 */
    __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_KjException); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2190, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_11);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_9);
    __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
    if (__pyx_t_10) {
      __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 2190, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;

      /* "capnp/lib/capnp.pyx":2191
 *             return _partial(self._send, name)
 *         except KjException as e:
 *             raise e._to_python(), None, _sys.exc_info()[2]             # <<<<<<<<<<<<<<
 * 
 *     cpdef upcast(self, schema) except +reraise_kj_exception:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_to_python); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2191, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2191, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_sys); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2191, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2191, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
        }
      }
      __pyx_t_6 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2191, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_6, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2191, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_Raise(__pyx_t_11, Py_None, __pyx_t_13, 0);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __PYX_ERR(0, 2191, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":2180
 * 
 *     def __getattr__(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             if name.endswith('_request'):
 *                 short_name = name[:-8]
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":2179
 *         return self._send_helper(name, word_count, args, kwargs)
 * 
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         try:
 *             if name.endswith('_request'):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_short_name);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2193
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 *     cpdef upcast(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_13upcast(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient_upcast(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("upcast", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_upcast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_13upcast)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2193, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2195
 *     cpdef upcast(self, schema) except +reraise_kj_exception:
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2195, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":2196
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2196, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":2195
 *     cpdef upcast(self, schema) except +reraise_kj_exception:
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":2198
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         return _DynamicCapabilityClient()._init(self.thisptr.upcast(s.thisptr), self._parent)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2198, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":2200
 *             s = schema
 * 
 *         return _DynamicCapabilityClient()._init(self.thisptr.upcast(s.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     cpdef cast_as(self, schema) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), __pyx_v_self->thisptr.upcast(__pyx_v_s->thisptr), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2193
 *             raise e._to_python(), None, _sys.exc_info()[2]
 * 
 *     cpdef upcast(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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("capnp.lib.capnp._DynamicCapabilityClient.upcast", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_13upcast(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_12upcast[] = "_DynamicCapabilityClient.upcast(self, schema)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_13upcast(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upcast (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_12upcast(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_12upcast(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("upcast", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient_upcast(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2193, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2193, __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("capnp.lib.capnp._DynamicCapabilityClient.upcast", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2202
 *         return _DynamicCapabilityClient()._init(self.thisptr.upcast(s.thisptr), self._parent)
 * 
 *     cpdef cast_as(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_15cast_as(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient_cast_as(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cast_as", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cast_as); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2202, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_15cast_as)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2202, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2204
 *     cpdef cast_as(self, schema) except +reraise_kj_exception:
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2204, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":2205
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2205, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":2204
 *     cpdef cast_as(self, schema) except +reraise_kj_exception:
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":2207
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityClient()._init(self.thisptr.castAs(s.thisptr), self._parent)
 * 
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2207, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":2208
 *         else:
 *             s = schema
 *         return _DynamicCapabilityClient()._init(self.thisptr.castAs(s.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 *     property schema:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), __pyx_v_self->thisptr.castAs< ::capnp::DynamicCapability>(__pyx_v_s->thisptr), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2202
 *         return _DynamicCapabilityClient()._init(self.thisptr.upcast(s.thisptr), self._parent)
 * 
 *     cpdef cast_as(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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("capnp.lib.capnp._DynamicCapabilityClient.cast_as", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_15cast_as(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14cast_as[] = "_DynamicCapabilityClient.cast_as(self, schema)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_15cast_as(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cast_as (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14cast_as(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14cast_as(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("cast_as", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient_cast_as(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2202, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2202, __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("capnp.lib.capnp._DynamicCapabilityClient.cast_as", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2212
 *     property schema:
 *         """A property that returns the _InterfaceSchema object matching this client"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._cached_schema is None:
 *                 self._cached_schema = _InterfaceSchema()._init(self.thisptr.getSchema())
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2213
 *         """A property that returns the _InterfaceSchema object matching this client"""
 *         def __get__(self):
 *             if self._cached_schema is None:             # <<<<<<<<<<<<<<
 *                 self._cached_schema = _InterfaceSchema()._init(self.thisptr.getSchema())
 *             return self._cached_schema
 */
  __pyx_t_1 = (__pyx_v_self->_cached_schema == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2214
 *         def __get__(self):
 *             if self._cached_schema is None:
 *                 self._cached_schema = _InterfaceSchema()._init(self.thisptr.getSchema())             # <<<<<<<<<<<<<<
 *             return self._cached_schema
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_3), __pyx_v_self->thisptr.getSchema()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->_cached_schema);
    __Pyx_DECREF(__pyx_v_self->_cached_schema);
    __pyx_v_self->_cached_schema = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":2213
 *         """A property that returns the _InterfaceSchema object matching this client"""
 *         def __get__(self):
 *             if self._cached_schema is None:             # <<<<<<<<<<<<<<
 *                 self._cached_schema = _InterfaceSchema()._init(self.thisptr.getSchema())
 *             return self._cached_schema
 */
  }

  /* "capnp/lib/capnp.pyx":2215
 *             if self._cached_schema is None:
 *                 self._cached_schema = _InterfaceSchema()._init(self.thisptr.getSchema())
 *             return self._cached_schema             # <<<<<<<<<<<<<<
 * 
 *     def __dir__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_cached_schema);
  __pyx_r = __pyx_v_self->_cached_schema;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2212
 *     property schema:
 *         """A property that returns the _InterfaceSchema object matching this client"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._cached_schema is None:
 *                 self._cached_schema = _InterfaceSchema()._init(self.thisptr.getSchema())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2217
 *             return self._cached_schema
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.method_names_inherited) + tuple(dir(self.__class__)))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_17__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_16__dir__[] = "_DynamicCapabilityClient.__dir__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_17__dir__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dir__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_16__dir__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_16__dir__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dir__", 0);

  /* "capnp/lib/capnp.pyx":2218
 * 
 *     def __dir__(self):
 *         return list(set(self.schema.method_names_inherited) + tuple(dir(self.__class__)))             # <<<<<<<<<<<<<<
 * 
 * cdef class _CapabilityClient:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_method_names_inherited); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Dir(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __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;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2217
 *             return self._cached_schema
 * 
 *     def __dir__(self):             # <<<<<<<<<<<<<<
 *         return list(set(self.schema.method_names_inherited) + tuple(dir(self.__class__)))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient.__dir__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2113
 * cdef class _DynamicCapabilityClient:
 *     cdef C_DynamicCapability.Client thisptr
 *     cdef public object _server, _parent, _cached_schema             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, C_DynamicCapability.Client other, object parent):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_server);
  __pyx_r = __pyx_v_self->_server;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_server);
  __Pyx_DECREF(__pyx_v_self->_server);
  __pyx_v_self->_server = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_server);
  __Pyx_DECREF(__pyx_v_self->_server);
  __pyx_v_self->_server = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_cached_schema);
  __pyx_r = __pyx_v_self->_cached_schema;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_cached_schema);
  __Pyx_DECREF(__pyx_v_self->_cached_schema);
  __pyx_v_self->_cached_schema = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cached_schema);
  __Pyx_DECREF(__pyx_v_self->_cached_schema);
  __pyx_v_self->_cached_schema = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_18__reduce_cython__[] = "_DynamicCapabilityClient.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_18__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_20__setstate_cython__[] = "_DynamicCapabilityClient.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_20__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_DynamicCapabilityClient_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._DynamicCapabilityClient.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2224
 *     cdef public object _parent
 * 
 *     cdef _init(self, C_Capability.Client other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = new C_Capability.Client(other)
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_17_CapabilityClient__init(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self,  ::capnp::Capability::Client __pyx_v_other, PyObject *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":2225
 * 
 *     cdef _init(self, C_Capability.Client other, object parent):
 *         self.thisptr = new C_Capability.Client(other)             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = new  ::capnp::Capability::Client(__pyx_v_other);

  /* "capnp/lib/capnp.pyx":2226
 *     cdef _init(self, C_Capability.Client other, object parent):
 *         self.thisptr = new C_Capability.Client(other)
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":2227
 *         self.thisptr = new C_Capability.Client(other)
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2224
 *     cdef public object _parent
 * 
 *     cdef _init(self, C_Capability.Client other, object parent):             # <<<<<<<<<<<<<<
 *         self.thisptr = new C_Capability.Client(other)
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":2229
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient___dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":2230
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     cpdef cast_as(self, schema):
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":2229
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":2232
 *         del self.thisptr
 * 
 *     cpdef cast_as(self, schema):             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_3cast_as(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_17_CapabilityClient_cast_as(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cast_as", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cast_as); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_3cast_as)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2232, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2234
 *     cpdef cast_as(self, schema):
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2234, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":2235
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2235, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":2234
 *     cpdef cast_as(self, schema):
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":2237
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityClient()._init(self.thisptr.castAs(s.thisptr), self._parent)
 * 
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2237, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":2238
 *         else:
 *             s = schema
 *         return _DynamicCapabilityClient()._init(self.thisptr.castAs(s.thisptr), self._parent)             # <<<<<<<<<<<<<<
 * 
 * cdef class _TwoPartyVatNetwork:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_self->_parent;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), __pyx_v_self->thisptr->castAs< ::capnp::DynamicCapability>(__pyx_v_s->thisptr), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2232
 *         del self.thisptr
 * 
 *     cpdef cast_as(self, schema):             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema s
 *         if hasattr(schema, 'schema'):
 */

  /* 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("capnp.lib.capnp._CapabilityClient.cast_as", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_3cast_as(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_17_CapabilityClient_2cast_as[] = "_CapabilityClient.cast_as(self, schema)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_3cast_as(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cast_as (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_2cast_as(((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_2cast_as(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("cast_as", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_17_CapabilityClient_cast_as(__pyx_v_self, __pyx_v_schema, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2232, __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("capnp.lib.capnp._CapabilityClient.cast_as", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2222
 * cdef class _CapabilityClient:
 *     cdef C_Capability.Client * thisptr
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, C_Capability.Client other, object parent):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_17_CapabilityClient_4__reduce_cython__[] = "_CapabilityClient.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._CapabilityClient.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_17_CapabilityClient_6__setstate_cython__[] = "_CapabilityClient.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_17_CapabilityClient_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._CapabilityClient.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2244
 *     cdef _AsyncIoStream stream
 * 
 *     cdef _init(self, _AsyncIoStream stream, Side side, schema_cpp.ReaderOptions opts):             # <<<<<<<<<<<<<<
 *         self.stream = stream
 *         self.thisptr = makeTwoPartyVatNetwork(deref(stream.thisptr), side, opts)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork__init(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *__pyx_v_stream,  ::capnp::rpc::twoparty::Side __pyx_v_side,  ::capnp::ReaderOptions __pyx_v_opts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":2245
 * 
 *     cdef _init(self, _AsyncIoStream stream, Side side, schema_cpp.ReaderOptions opts):
 *         self.stream = stream             # <<<<<<<<<<<<<<
 *         self.thisptr = makeTwoPartyVatNetwork(deref(stream.thisptr), side, opts)
 *         return self
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_stream));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_stream));
  __Pyx_GOTREF(__pyx_v_self->stream);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->stream));
  __pyx_v_self->stream = __pyx_v_stream;

  /* "capnp/lib/capnp.pyx":2246
 *     cdef _init(self, _AsyncIoStream stream, Side side, schema_cpp.ReaderOptions opts):
 *         self.stream = stream
 *         self.thisptr = makeTwoPartyVatNetwork(deref(stream.thisptr), side, opts)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr =  ::kj::heap< ::capnp::TwoPartyVatNetwork>((*__pyx_v_stream->thisptr), __pyx_v_side, __pyx_v_opts);

  /* "capnp/lib/capnp.pyx":2247
 *         self.stream = stream
 *         self.thisptr = makeTwoPartyVatNetwork(deref(stream.thisptr), side, opts)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef _init_pipe(self, _TwoWayPipe pipe, Side side, schema_cpp.ReaderOptions opts):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2244
 *     cdef _AsyncIoStream stream
 * 
 *     cdef _init(self, _AsyncIoStream stream, Side side, schema_cpp.ReaderOptions opts):             # <<<<<<<<<<<<<<
 *         self.stream = stream
 *         self.thisptr = makeTwoPartyVatNetwork(deref(stream.thisptr), side, opts)
 */

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

/* "capnp/lib/capnp.pyx":2249
 *         return self
 * 
 *     cdef _init_pipe(self, _TwoWayPipe pipe, Side side, schema_cpp.ReaderOptions opts):             # <<<<<<<<<<<<<<
 *         self.thisptr = makeTwoPartyVatNetwork(deref(pipe._pipe.ends[0]), side, opts)
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork__init_pipe(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_pipe,  ::capnp::rpc::twoparty::Side __pyx_v_side,  ::capnp::ReaderOptions __pyx_v_opts) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_pipe", 0);

  /* "capnp/lib/capnp.pyx":2250
 * 
 *     cdef _init_pipe(self, _TwoWayPipe pipe, Side side, schema_cpp.ReaderOptions opts):
 *         self.thisptr = makeTwoPartyVatNetwork(deref(pipe._pipe.ends[0]), side, opts)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr =  ::kj::heap< ::capnp::TwoPartyVatNetwork>((*(__pyx_v_pipe->_pipe.ends[0])), __pyx_v_side, __pyx_v_opts);

  /* "capnp/lib/capnp.pyx":2251
 *     cdef _init_pipe(self, _TwoWayPipe pipe, Side side, schema_cpp.ReaderOptions opts):
 *         self.thisptr = makeTwoPartyVatNetwork(deref(pipe._pipe.ends[0]), side, opts)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2249
 *         return self
 * 
 *     cdef _init_pipe(self, _TwoWayPipe pipe, Side side, schema_cpp.ReaderOptions opts):             # <<<<<<<<<<<<<<
 *         self.thisptr = makeTwoPartyVatNetwork(deref(pipe._pipe.ends[0]), side, opts)
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":2253
 *         return self
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _VoidPromise()._init(deref(self.thisptr).onDisconnect(), self)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_1on_disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise__init __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_disconnect", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_disconnect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_1on_disconnect)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2253, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2254
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:
 *         return _VoidPromise()._init(deref(self.thisptr).onDisconnect(), self)             # <<<<<<<<<<<<<<
 * 
 * cdef class TwoPartyClient:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__VoidPromise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5.__pyx_n = 1;
  __pyx_t_5.parent = ((PyObject *)__pyx_v_self);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise *)((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1), (*__pyx_v_self->thisptr).onDisconnect(), &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2254, __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;

  /* "capnp/lib/capnp.pyx":2253
 *         return self
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _VoidPromise()._init(deref(self.thisptr).onDisconnect(), self)
 * 
 */

  /* 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("capnp.lib.capnp._TwoPartyVatNetwork.on_disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_1on_disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_on_disconnect[] = "_TwoPartyVatNetwork.on_disconnect(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_1on_disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_disconnect (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_on_disconnect(((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__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("on_disconnect", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_on_disconnect(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2253, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2253, __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("capnp.lib.capnp._TwoPartyVatNetwork.on_disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_2__reduce_cython__[] = "_TwoPartyVatNetwork.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._TwoPartyVatNetwork.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_4__setstate_cython__[] = "_TwoPartyVatNetwork.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._TwoPartyVatNetwork.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2273
 *     cdef public _TwoWayPipe _pipe
 * 
 *     def __init__(self, socket=None, traversal_limit_in_words=None, nesting_limit=None):             # <<<<<<<<<<<<<<
 *         if isinstance(socket, basestring):
 *             socket = self._connect(socket)
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_socket = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 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_socket,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_socket);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2273, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_socket = values[0];
    __pyx_v_traversal_limit_in_words = values[1];
    __pyx_v_nesting_limit = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2273, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyClient.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient___init__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self), __pyx_v_socket, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient___init__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_socket, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
   ::capnp::ReaderOptions __pyx_v_opts;
  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("__init__", 0);
  __Pyx_INCREF(__pyx_v_socket);

  /* "capnp/lib/capnp.pyx":2274
 * 
 *     def __init__(self, socket=None, traversal_limit_in_words=None, nesting_limit=None):
 *         if isinstance(socket, basestring):             # <<<<<<<<<<<<<<
 *             socket = self._connect(socket)
 * 
 */
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_socket); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2275
 *     def __init__(self, socket=None, traversal_limit_in_words=None, nesting_limit=None):
 *         if isinstance(socket, basestring):
 *             socket = self._connect(socket)             # <<<<<<<<<<<<<<
 * 
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self->__pyx_vtab)->_connect(__pyx_v_self, __pyx_v_socket, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_socket, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":2274
 * 
 *     def __init__(self, socket=None, traversal_limit_in_words=None, nesting_limit=None):
 *         if isinstance(socket, basestring):             # <<<<<<<<<<<<<<
 *             socket = self._connect(socket)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":2277
 *             socket = self._connect(socket)
 * 
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 * 
 *         self._orig_stream = socket
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":2279
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 *         self._orig_stream = socket             # <<<<<<<<<<<<<<
 *         if self._orig_stream:
 *             self._stream = _FdAsyncIoStream(socket.fileno())
 */
  __Pyx_INCREF(__pyx_v_socket);
  __Pyx_GIVEREF(__pyx_v_socket);
  __Pyx_GOTREF(__pyx_v_self->_orig_stream);
  __Pyx_DECREF(__pyx_v_self->_orig_stream);
  __pyx_v_self->_orig_stream = __pyx_v_socket;

  /* "capnp/lib/capnp.pyx":2280
 * 
 *         self._orig_stream = socket
 *         if self._orig_stream:             # <<<<<<<<<<<<<<
 *             self._stream = _FdAsyncIoStream(socket.fileno())
 *             self._network = _TwoPartyVatNetwork()._init(self._stream, capnp.CLIENT, opts)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_orig_stream); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2280, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2281
 *         self._orig_stream = socket
 *         if self._orig_stream:
 *             self._stream = _FdAsyncIoStream(socket.fileno())             # <<<<<<<<<<<<<<
 *             self._network = _TwoPartyVatNetwork()._init(self._stream, capnp.CLIENT, opts)
 *         else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_socket, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__FdAsyncIoStream), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->_stream);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_stream));
    __pyx_v_self->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":2282
 *         if self._orig_stream:
 *             self._stream = _FdAsyncIoStream(socket.fileno())
 *             self._network = _TwoPartyVatNetwork()._init(self._stream, capnp.CLIENT, opts)             # <<<<<<<<<<<<<<
 *         else:
 *             # Initialize TwoWayPipe, to use pipe() acquire other end of the pipe using read() and write() methods
 */
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = ((PyObject *)__pyx_v_self->_stream);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoPartyVatNetwork *)((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_4), ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)__pyx_t_3),  ::capnp::rpc::twoparty::Side::CLIENT, __pyx_v_opts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork))))) __PYX_ERR(0, 2282, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_network);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_network));
    __pyx_v_self->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":2280
 * 
 *         self._orig_stream = socket
 *         if self._orig_stream:             # <<<<<<<<<<<<<<
 *             self._stream = _FdAsyncIoStream(socket.fileno())
 *             self._network = _TwoPartyVatNetwork()._init(self._stream, capnp.CLIENT, opts)
 */
    goto __pyx_L4;
  }

  /* "capnp/lib/capnp.pyx":2285
 *         else:
 *             # Initialize TwoWayPipe, to use pipe() acquire other end of the pipe using read() and write() methods
 *             self._pipe = _TwoWayPipe()             # <<<<<<<<<<<<<<
 *             self._network = _TwoPartyVatNetwork()._init_pipe(self._pipe, capnp.CLIENT, opts)
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__TwoWayPipe)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_pipe);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_pipe));
    __pyx_v_self->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":2286
 *             # Initialize TwoWayPipe, to use pipe() acquire other end of the pipe using read() and write() methods
 *             self._pipe = _TwoWayPipe()
 *             self._network = _TwoPartyVatNetwork()._init_pipe(self._pipe, capnp.CLIENT, opts)             # <<<<<<<<<<<<<<
 * 
 *         self.thisptr = new RpcSystem(makeRpcClient(deref(self._network.thisptr)))
 */
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = ((PyObject *)__pyx_v_self->_pipe);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoPartyVatNetwork *)((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_5)->__pyx_vtab)->_init_pipe(((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_5), ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_t_3),  ::capnp::rpc::twoparty::Side::CLIENT, __pyx_v_opts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2286, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork))))) __PYX_ERR(0, 2286, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->_network);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_network));
    __pyx_v_self->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "capnp/lib/capnp.pyx":2288
 *             self._network = _TwoPartyVatNetwork()._init_pipe(self._pipe, capnp.CLIENT, opts)
 * 
 *         self.thisptr = new RpcSystem(makeRpcClient(deref(self._network.thisptr)))             # <<<<<<<<<<<<<<
 *         if self._orig_stream:
 *             Py_INCREF(self._orig_stream)
 */
  __pyx_v_self->thisptr = new  ::capnp::RpcSystem<capnp::rpc::twoparty::SturdyRefHostId>( ::capnp::makeRpcClient((*__pyx_v_self->_network->thisptr)));

  /* "capnp/lib/capnp.pyx":2289
 * 
 *         self.thisptr = new RpcSystem(makeRpcClient(deref(self._network.thisptr)))
 *         if self._orig_stream:             # <<<<<<<<<<<<<<
 *             Py_INCREF(self._orig_stream)
 *             Py_INCREF(self._stream)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_orig_stream); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2289, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2290
 *         self.thisptr = new RpcSystem(makeRpcClient(deref(self._network.thisptr)))
 *         if self._orig_stream:
 *             Py_INCREF(self._orig_stream)             # <<<<<<<<<<<<<<
 *             Py_INCREF(self._stream)
 *         else:
 */
    __pyx_t_4 = __pyx_v_self->_orig_stream;
    __Pyx_INCREF(__pyx_t_4);
    Py_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":2291
 *         if self._orig_stream:
 *             Py_INCREF(self._orig_stream)
 *             Py_INCREF(self._stream)             # <<<<<<<<<<<<<<
 *         else:
 *             Py_INCREF(self._pipe)
 */
    __pyx_t_4 = ((PyObject *)__pyx_v_self->_stream);
    __Pyx_INCREF(__pyx_t_4);
    Py_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":2289
 * 
 *         self.thisptr = new RpcSystem(makeRpcClient(deref(self._network.thisptr)))
 *         if self._orig_stream:             # <<<<<<<<<<<<<<
 *             Py_INCREF(self._orig_stream)
 *             Py_INCREF(self._stream)
 */
    goto __pyx_L5;
  }

  /* "capnp/lib/capnp.pyx":2293
 *             Py_INCREF(self._stream)
 *         else:
 *             Py_INCREF(self._pipe)             # <<<<<<<<<<<<<<
 *         Py_INCREF(self._network) # TODO:MEMORY: attach this to onDrained, also figure out what's leaking
 * 
 */
  /*else*/ {
    __pyx_t_4 = ((PyObject *)__pyx_v_self->_pipe);
    __Pyx_INCREF(__pyx_t_4);
    Py_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L5:;

  /* "capnp/lib/capnp.pyx":2294
 *         else:
 *             Py_INCREF(self._pipe)
 *         Py_INCREF(self._network) # TODO:MEMORY: attach this to onDrained, also figure out what's leaking             # <<<<<<<<<<<<<<
 * 
 *     async def read(self, bufsize):
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->_network);
  __Pyx_INCREF(__pyx_t_4);
  Py_INCREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2273
 *     cdef public _TwoWayPipe _pipe
 * 
 *     def __init__(self, socket=None, traversal_limit_in_words=None, nesting_limit=None):             # <<<<<<<<<<<<<<
 *         if isinstance(socket, basestring):
 *             socket = self._connect(socket)
 */

  /* 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("capnp.lib.capnp.TwoPartyClient.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_socket);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_14TwoPartyClient_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":2296
 *         Py_INCREF(self._network) # TODO:MEMORY: attach this to onDrained, also figure out what's leaking
 * 
 *     async def read(self, bufsize):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp reader (asyncio sockets only)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_3read(PyObject *__pyx_v_self, PyObject *__pyx_v_bufsize); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_2read[] = "TwoPartyClient.read(self, bufsize)\n\n        libcapnp reader (asyncio sockets only)\n\n        :param bufsize: Buffer size to read from the libcapnp library\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_3read(PyObject *__pyx_v_self, PyObject *__pyx_v_bufsize) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_2read(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self), ((PyObject *)__pyx_v_bufsize));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_2read(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_bufsize) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_3_read(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_3_read, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2296, __pyx_L1_error)
  } else {
    __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_cur_scope->__pyx_v_bufsize = __pyx_v_bufsize;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bufsize);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bufsize);
  {
    __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_14TwoPartyClient_4generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_read, __pyx_n_s_TwoPartyClient_read, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 2296, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyClient.read", __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_5capnp_3lib_5capnp_14TwoPartyClient_4generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  size_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_await;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2296, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2305
 *             self._pipe._pipe.ends[1].get(),
 *             &self._pipe._event_loop.thisptr.waitScope,
 *             bufsize             # <<<<<<<<<<<<<<
 *         )
 *         while not reader.poll():
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_bufsize); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2305, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2302
 *         :param bufsize: Buffer size to read from the libcapnp library
 *         """
 *         cdef AsyncIoStreamReadHelper *reader = new AsyncIoStreamReadHelper(             # <<<<<<<<<<<<<<
 *             self._pipe._pipe.ends[1].get(),
 *             &self._pipe._event_loop.thisptr.waitScope,
 */
  __pyx_cur_scope->__pyx_v_reader = new AsyncIoStreamReadHelper((__pyx_cur_scope->__pyx_v_self->_pipe->_pipe.ends[1]).get(), (&__pyx_cur_scope->__pyx_v_self->_pipe->_event_loop->thisptr->waitScope), __pyx_t_1);

  /* "capnp/lib/capnp.pyx":2307
 *             bufsize
 *         )
 *         while not reader.poll():             # <<<<<<<<<<<<<<
 *             await asyncio.sleep(0.01)
 * 
 */
  while (1) {
    __pyx_t_2 = ((!(__pyx_cur_scope->__pyx_v_reader->poll() != 0)) != 0);
    if (!__pyx_t_2) break;

    /* "capnp/lib/capnp.pyx":2308
 *         )
 *         while not reader.poll():
 *             await asyncio.sleep(0.01)             # <<<<<<<<<<<<<<
 * 
 *         cdef array.array read_buffer = array.array('b', [])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sleep); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_float_0_01);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XGOTREF(__pyx_r);
    if (likely(__pyx_r)) {
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, awaiting value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L6_resume_from_await:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2308, __pyx_L1_error)
    } else {
      PyObject* exc_type = __Pyx_PyErr_Occurred();
      if (exc_type) {
        if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
        else __PYX_ERR(0, 2308, __pyx_L1_error)
      }
    }
  }

  /* "capnp/lib/capnp.pyx":2310
 *             await asyncio.sleep(0.01)
 * 
 *         cdef array.array read_buffer = array.array('b', [])             # <<<<<<<<<<<<<<
 *         array.resize(read_buffer, reader.read_size())
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_b);
  __Pyx_GIVEREF(__pyx_n_s_b);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_b);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_read_buffer = ((arrayobject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2311
 * 
 *         cdef array.array read_buffer = array.array('b', [])
 *         array.resize(read_buffer, reader.read_size())             # <<<<<<<<<<<<<<
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())
 *         del reader
 */
  __pyx_t_6 = resize(__pyx_cur_scope->__pyx_v_read_buffer, __pyx_cur_scope->__pyx_v_reader->read_size()); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2311, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2312
 *         cdef array.array read_buffer = array.array('b', [])
 *         array.resize(read_buffer, reader.read_size())
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())             # <<<<<<<<<<<<<<
 *         del reader
 *         return read_buffer
 */
  (void)(memcpy(__pyx_cur_scope->__pyx_v_read_buffer->data.as_voidptr, __pyx_cur_scope->__pyx_v_reader->read_buffer(), __pyx_cur_scope->__pyx_v_reader->read_size()));

  /* "capnp/lib/capnp.pyx":2313
 *         array.resize(read_buffer, reader.read_size())
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())
 *         del reader             # <<<<<<<<<<<<<<
 *         return read_buffer
 * 
 */
  delete __pyx_cur_scope->__pyx_v_reader;

  /* "capnp/lib/capnp.pyx":2314
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())
 *         del reader
 *         return read_buffer             # <<<<<<<<<<<<<<
 * 
 *     def write(self, data):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = NULL; __Pyx_ReturnWithStopIteration(((PyObject *)__pyx_cur_scope->__pyx_v_read_buffer));
  goto __pyx_L0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "capnp/lib/capnp.pyx":2296
 *         Py_INCREF(self._network) # TODO:MEMORY: attach this to onDrained, also figure out what's leaking
 * 
 *     async def read(self, bufsize):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp reader (asyncio sockets only)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2316
 *         return read_buffer
 * 
 *     def write(self, data):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp writer (asyncio sockets only)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_6write(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_5write[] = "TwoPartyClient.write(self, data)\n\n        libcapnp writer (asyncio sockets only)\n\n        :param data: Buffer to write to the libcapnp library\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_6write(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5write(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self), ((PyObject *)__pyx_v_data));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5write(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_data) {
  arrayobject *__pyx_v_write_buffer = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("write", 0);

  /* "capnp/lib/capnp.pyx":2322
 *         :param data: Buffer to write to the libcapnp library
 *         """
 *         cdef array.array write_buffer = array.array('b', data)             # <<<<<<<<<<<<<<
 *         deref(self._pipe._pipe.ends[1]).write(
 *             write_buffer.data.as_voidptr,
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_b);
  __Pyx_GIVEREF(__pyx_n_s_b);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_b);
  __Pyx_INCREF(__pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_data);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_write_buffer = ((arrayobject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2325
 *         deref(self._pipe._pipe.ends[1]).write(
 *             write_buffer.data.as_voidptr,
 *             len(data)             # <<<<<<<<<<<<<<
 *         ).wait(self._pipe._event_loop.thisptr.waitScope)
 * 
 */
  __pyx_t_3 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2325, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2326
 *             write_buffer.data.as_voidptr,
 *             len(data)
 *         ).wait(self._pipe._event_loop.thisptr.waitScope)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  (*(__pyx_v_self->_pipe->_pipe.ends[1])).write(__pyx_v_write_buffer->data.as_voidptr, __pyx_t_3).wait(__pyx_v_self->_pipe->_event_loop->thisptr->waitScope);

  /* "capnp/lib/capnp.pyx":2316
 *         return read_buffer
 * 
 *     def write(self, data):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp writer (asyncio sockets only)
 */

  /* 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_AddTraceback("capnp.lib.capnp.TwoPartyClient.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_write_buffer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2328
 *         ).wait(self._pipe._event_loop.thisptr.waitScope)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":2329
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     cpdef _connect(self, host_string):
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":2328
 *         ).wait(self._pipe._event_loop.thisptr.waitScope)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":2331
 *         del self.thisptr
 * 
 *     cpdef _connect(self, host_string):             # <<<<<<<<<<<<<<
 *         if host_string.startswith('unix:'):
 *             path = host_string[5:]
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_10_connect(PyObject *__pyx_v_self, PyObject *__pyx_v_host_string); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyClient__connect(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_host_string, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_v_sock = NULL;
  PyObject *__pyx_v_host = NULL;
  PyObject *__pyx_v_port = 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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_connect", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_connect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_10_connect)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_host_string) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_host_string);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2331, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2332
 * 
 *     cpdef _connect(self, host_string):
 *         if host_string.startswith('unix:'):             # <<<<<<<<<<<<<<
 *             path = host_string[5:]
 *             sock = _socket.socket(_socket.AF_UNIX, _socket.SOCK_STREAM)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_host_string, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_unix) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_unix);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2332, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "capnp/lib/capnp.pyx":2333
 *     cpdef _connect(self, host_string):
 *         if host_string.startswith('unix:'):
 *             path = host_string[5:]             # <<<<<<<<<<<<<<
 *             sock = _socket.socket(_socket.AF_UNIX, _socket.SOCK_STREAM)
 *             sock.connect(path)
 */
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_host_string, 5, 0, NULL, NULL, &__pyx_slice__46, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_path = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":2334
 *         if host_string.startswith('unix:'):
 *             path = host_string[5:]
 *             sock = _socket.socket(_socket.AF_UNIX, _socket.SOCK_STREAM)             # <<<<<<<<<<<<<<
 *             sock.connect(path)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_socket); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AF_UNIX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SOCK_STREAM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_6};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2334, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_6);
      __pyx_t_4 = 0;
      __pyx_t_6 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sock = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":2335
 *             path = host_string[5:]
 *             sock = _socket.socket(_socket.AF_UNIX, _socket.SOCK_STREAM)
 *             sock.connect(path)             # <<<<<<<<<<<<<<
 *         else:
 *             host, port = host_string.split(':')
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_connect_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_path);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2335, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":2332
 * 
 *     cpdef _connect(self, host_string):
 *         if host_string.startswith('unix:'):             # <<<<<<<<<<<<<<
 *             path = host_string[5:]
 *             sock = _socket.socket(_socket.AF_UNIX, _socket.SOCK_STREAM)
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":2337
 *             sock.connect(path)
 *         else:
 *             host, port = host_string.split(':')             # <<<<<<<<<<<<<<
 * 
 *             sock = _socket.create_connection((host, port))
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_host_string, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_kp_s__3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s__3);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2337, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2337, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2337, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_host = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_port = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "capnp/lib/capnp.pyx":2339
 *             host, port = host_string.split(':')
 * 
 *             sock = _socket.create_connection((host, port))             # <<<<<<<<<<<<<<
 * 
 *             # Set TCP_NODELAY on socket to disable Nagle's algorithm. This is not
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_create_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_v_host);
    __Pyx_GIVEREF(__pyx_v_host);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_host);
    __Pyx_INCREF(__pyx_v_port);
    __Pyx_GIVEREF(__pyx_v_port);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_port);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sock = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":2343
 *             # Set TCP_NODELAY on socket to disable Nagle's algorithm. This is not
 *             # neccessary, but it speeds things up.
 *             sock.setsockopt(_socket.IPPROTO_TCP, _socket.TCP_NODELAY, 1)             # <<<<<<<<<<<<<<
 *         return sock
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sock, __pyx_n_s_setsockopt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_IPPROTO_TCP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_socket_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_TCP_NODELAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_6, __pyx_t_4, __pyx_int_1};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2343, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_6, __pyx_t_4, __pyx_int_1};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2343, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_8) {
        __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_t_4);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_7, __pyx_int_1);
      __pyx_t_6 = 0;
      __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":2344
 *             # neccessary, but it speeds things up.
 *             sock.setsockopt(_socket.IPPROTO_TCP, _socket.TCP_NODELAY, 1)
 *         return sock             # <<<<<<<<<<<<<<
 * 
 *     cpdef bootstrap(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_sock);
  __pyx_r = __pyx_v_sock;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2331
 *         del self.thisptr
 * 
 *     cpdef _connect(self, host_string):             # <<<<<<<<<<<<<<
 *         if host_string.startswith('unix:'):
 *             path = host_string[5:]
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyClient._connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XDECREF(__pyx_v_sock);
  __Pyx_XDECREF(__pyx_v_host);
  __Pyx_XDECREF(__pyx_v_port);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_10_connect(PyObject *__pyx_v_self, PyObject *__pyx_v_host_string); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_9_connect[] = "TwoPartyClient._connect(self, host_string)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_10_connect(PyObject *__pyx_v_self, PyObject *__pyx_v_host_string) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_connect (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_9_connect(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self), ((PyObject *)__pyx_v_host_string));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_9_connect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_host_string) {
  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("_connect", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14TwoPartyClient__connect(__pyx_v_self, __pyx_v_host_string, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2331, __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("capnp.lib.capnp.TwoPartyClient._connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2346
 *         return sock
 * 
 *     cpdef bootstrap(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _CapabilityClient()._init(helpers.bootstrapHelper(deref(self.thisptr)), self)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12bootstrap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyClient_bootstrap(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bootstrap", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bootstrap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12bootstrap)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2346, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2347
 * 
 *     cpdef bootstrap(self) except +reraise_kj_exception:
 *         return _CapabilityClient()._init(helpers.bootstrapHelper(deref(self.thisptr)), self)             # <<<<<<<<<<<<<<
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__CapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__CapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_t_1), bootstrapHelper((*__pyx_v_self->thisptr)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2347, __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;

  /* "capnp/lib/capnp.pyx":2346
 *         return sock
 * 
 *     cpdef bootstrap(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _CapabilityClient()._init(helpers.bootstrapHelper(deref(self.thisptr)), self)
 * 
 */

  /* 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("capnp.lib.capnp.TwoPartyClient.bootstrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12bootstrap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_11bootstrap[] = "TwoPartyClient.bootstrap(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12bootstrap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bootstrap (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_11bootstrap(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_11bootstrap(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__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("bootstrap", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14TwoPartyClient_bootstrap(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2346, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2346, __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("capnp.lib.capnp.TwoPartyClient.bootstrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2349
 *         return _CapabilityClient()._init(helpers.bootstrapHelper(deref(self.thisptr)), self)
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_14on_disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyClient_on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_disconnect", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_disconnect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_14on_disconnect)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2349, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2350
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())             # <<<<<<<<<<<<<<
 * 
 * cdef class TwoPartyServer:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__VoidPromise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise *)((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1), (*__pyx_v_self->_network->thisptr).onDisconnect(), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2350, __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;

  /* "capnp/lib/capnp.pyx":2349
 *         return _CapabilityClient()._init(helpers.bootstrapHelper(deref(self.thisptr)), self)
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())
 * 
 */

  /* 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("capnp.lib.capnp.TwoPartyClient.on_disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_14on_disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_13on_disconnect[] = "TwoPartyClient.on_disconnect(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_14on_disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_disconnect (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_13on_disconnect(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_13on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__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("on_disconnect", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14TwoPartyClient_on_disconnect(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2349, __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("capnp.lib.capnp.TwoPartyClient.on_disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2268
 *     """
 *     cdef RpcSystem * thisptr
 *     cdef public _TwoPartyVatNetwork _network             # <<<<<<<<<<<<<<
 *     cdef public object _orig_stream
 *     cdef public _AsyncIoStream _stream
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8_network_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8_network_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_8_network___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_8_network___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_network));
  __pyx_r = ((PyObject *)__pyx_v_self->_network);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8_network_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8_network_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_8_network_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_8_network_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork))))) __PYX_ERR(0, 2268, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_network);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_network));
  __pyx_v_self->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyClient._network.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8_network_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8_network_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_8_network_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_8_network_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_network);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_network));
  __pyx_v_self->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)Py_None);

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

/* "capnp/lib/capnp.pyx":2269
 *     cdef RpcSystem * thisptr
 *     cdef public _TwoPartyVatNetwork _network
 *     cdef public object _orig_stream             # <<<<<<<<<<<<<<
 *     cdef public _AsyncIoStream _stream
 *     cdef public _TwoWayPipe _pipe
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_orig_stream);
  __pyx_r = __pyx_v_self->_orig_stream;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_orig_stream);
  __Pyx_DECREF(__pyx_v_self->_orig_stream);
  __pyx_v_self->_orig_stream = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_orig_stream);
  __Pyx_DECREF(__pyx_v_self->_orig_stream);
  __pyx_v_self->_orig_stream = Py_None;

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

/* "capnp/lib/capnp.pyx":2270
 *     cdef public _TwoPartyVatNetwork _network
 *     cdef public object _orig_stream
 *     cdef public _AsyncIoStream _stream             # <<<<<<<<<<<<<<
 *     cdef public _TwoWayPipe _pipe
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7_stream___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7_stream___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_stream));
  __pyx_r = ((PyObject *)__pyx_v_self->_stream);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream))))) __PYX_ERR(0, 2270, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_stream);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_stream));
  __pyx_v_self->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyClient._stream.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_stream);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_stream));
  __pyx_v_self->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)Py_None);

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

/* "capnp/lib/capnp.pyx":2271
 *     cdef public object _orig_stream
 *     cdef public _AsyncIoStream _stream
 *     cdef public _TwoWayPipe _pipe             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, socket=None, traversal_limit_in_words=None, nesting_limit=None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_pipe));
  __pyx_r = ((PyObject *)__pyx_v_self->_pipe);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__TwoWayPipe))))) __PYX_ERR(0, 2271, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_pipe);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_pipe));
  __pyx_v_self->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyClient._pipe.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_pipe);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_pipe));
  __pyx_v_self->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)Py_None);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_16__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_15__reduce_cython__[] = "TwoPartyClient.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_16__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_15__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_15__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyClient.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_18__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_17__setstate_cython__[] = "TwoPartyClient.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_18__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_17__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyClient_17__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyClient.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2375
 *     cdef capnp.ErrorHandler _error_handler
 * 
 *     def __init__(self, socket=None, bootstrap=None, traversal_limit_in_words=None, nesting_limit=None):             # <<<<<<<<<<<<<<
 *         if not bootstrap:
 *             raise KjException("You must provide a bootstrap interface to a server constructor.")
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_socket = 0;
  PyObject *__pyx_v_bootstrap = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 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_socket,&__pyx_n_s_bootstrap,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_socket);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bootstrap);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2375, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_socket = values[0];
    __pyx_v_bootstrap = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2375, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer___init__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), __pyx_v_socket, __pyx_v_bootstrap, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer___init__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_socket, PyObject *__pyx_v_bootstrap, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_schema = 0;
  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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":2376
 * 
 *     def __init__(self, socket=None, bootstrap=None, traversal_limit_in_words=None, nesting_limit=None):
 *         if not bootstrap:             # <<<<<<<<<<<<<<
 *             raise KjException("You must provide a bootstrap interface to a server constructor.")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_bootstrap); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2376, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "capnp/lib/capnp.pyx":2377
 *     def __init__(self, socket=None, bootstrap=None, traversal_limit_in_words=None, nesting_limit=None):
 *         if not bootstrap:
 *             raise KjException("You must provide a bootstrap interface to a server constructor.")             # <<<<<<<<<<<<<<
 * 
 *         cdef _InterfaceSchema schema
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_KjException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_You_must_provide_a_bootstrap_int) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_You_must_provide_a_bootstrap_int);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2377, __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_ERR(0, 2377, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":2376
 * 
 *     def __init__(self, socket=None, bootstrap=None, traversal_limit_in_words=None, nesting_limit=None):
 *         if not bootstrap:             # <<<<<<<<<<<<<<
 *             raise KjException("You must provide a bootstrap interface to a server constructor.")
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":2380
 * 
 *         cdef _InterfaceSchema schema
 *         self._bootstrap = None             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(socket, basestring):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_bootstrap);
  __Pyx_DECREF(__pyx_v_self->_bootstrap);
  __pyx_v_self->_bootstrap = Py_None;

  /* "capnp/lib/capnp.pyx":2382
 *         self._bootstrap = None
 * 
 *         if isinstance(socket, basestring):             # <<<<<<<<<<<<<<
 *             self._connect(socket, bootstrap, traversal_limit_in_words, nesting_limit)
 *             return
 */
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_v_socket); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":2383
 * 
 *         if isinstance(socket, basestring):
 *             self._connect(socket, bootstrap, traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *             return
 * 
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self->__pyx_vtab)->_connect(__pyx_v_self, __pyx_v_socket, __pyx_v_bootstrap, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":2384
 *         if isinstance(socket, basestring):
 *             self._connect(socket, bootstrap, traversal_limit_in_words, nesting_limit)
 *             return             # <<<<<<<<<<<<<<
 * 
 *         self._orig_stream = socket
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2382
 *         self._bootstrap = None
 * 
 *         if isinstance(socket, basestring):             # <<<<<<<<<<<<<<
 *             self._connect(socket, bootstrap, traversal_limit_in_words, nesting_limit)
 *             return
 */
  }

  /* "capnp/lib/capnp.pyx":2386
 *             return
 * 
 *         self._orig_stream = socket             # <<<<<<<<<<<<<<
 *         if self._orig_stream:
 *             self._stream = _FdAsyncIoStream(socket.fileno())
 */
  __Pyx_INCREF(__pyx_v_socket);
  __Pyx_GIVEREF(__pyx_v_socket);
  __Pyx_GOTREF(__pyx_v_self->_orig_stream);
  __Pyx_DECREF(__pyx_v_self->_orig_stream);
  __pyx_v_self->_orig_stream = __pyx_v_socket;

  /* "capnp/lib/capnp.pyx":2387
 * 
 *         self._orig_stream = socket
 *         if self._orig_stream:             # <<<<<<<<<<<<<<
 *             self._stream = _FdAsyncIoStream(socket.fileno())
 *             self._network = _TwoPartyVatNetwork()._init(self._stream, capnp.SERVER, make_reader_opts(traversal_limit_in_words, nesting_limit))
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_orig_stream); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2387, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":2388
 *         self._orig_stream = socket
 *         if self._orig_stream:
 *             self._stream = _FdAsyncIoStream(socket.fileno())             # <<<<<<<<<<<<<<
 *             self._network = _TwoPartyVatNetwork()._init(self._stream, capnp.SERVER, make_reader_opts(traversal_limit_in_words, nesting_limit))
 *         else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_socket, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__FdAsyncIoStream), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->_stream);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_stream));
    __pyx_v_self->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":2389
 *         if self._orig_stream:
 *             self._stream = _FdAsyncIoStream(socket.fileno())
 *             self._network = _TwoPartyVatNetwork()._init(self._stream, capnp.SERVER, make_reader_opts(traversal_limit_in_words, nesting_limit))             # <<<<<<<<<<<<<<
 *         else:
 *             # Initialize TwoWayPipe, to use pipe() acquire other end of the pipe using read() and write() methods
 */
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = ((PyObject *)__pyx_v_self->_stream);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoPartyVatNetwork *)((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_4), ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)__pyx_t_3),  ::capnp::rpc::twoparty::Side::SERVER, __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork))))) __PYX_ERR(0, 2389, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_network);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_network));
    __pyx_v_self->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":2387
 * 
 *         self._orig_stream = socket
 *         if self._orig_stream:             # <<<<<<<<<<<<<<
 *             self._stream = _FdAsyncIoStream(socket.fileno())
 *             self._network = _TwoPartyVatNetwork()._init(self._stream, capnp.SERVER, make_reader_opts(traversal_limit_in_words, nesting_limit))
 */
    goto __pyx_L5;
  }

  /* "capnp/lib/capnp.pyx":2392
 *         else:
 *             # Initialize TwoWayPipe, to use pipe() acquire other end of the pipe using read() and write() methods
 *             self._pipe = _TwoWayPipe()             # <<<<<<<<<<<<<<
 *             self._network = _TwoPartyVatNetwork()._init_pipe(self._pipe, capnp.SERVER, make_reader_opts(traversal_limit_in_words, nesting_limit))
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__TwoWayPipe)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_pipe);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_pipe));
    __pyx_v_self->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":2393
 *             # Initialize TwoWayPipe, to use pipe() acquire other end of the pipe using read() and write() methods
 *             self._pipe = _TwoWayPipe()
 *             self._network = _TwoPartyVatNetwork()._init_pipe(self._pipe, capnp.SERVER, make_reader_opts(traversal_limit_in_words, nesting_limit))             # <<<<<<<<<<<<<<
 * 
 *         self._port = 0
 */
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = ((PyObject *)__pyx_v_self->_pipe);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoPartyVatNetwork *)((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_5)->__pyx_vtab)->_init_pipe(((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_5), ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_t_3),  ::capnp::rpc::twoparty::Side::SERVER, __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork))))) __PYX_ERR(0, 2393, __pyx_L1_error)
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_self->_network);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_network));
    __pyx_v_self->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L5:;

  /* "capnp/lib/capnp.pyx":2395
 *             self._network = _TwoPartyVatNetwork()._init_pipe(self._pipe, capnp.SERVER, make_reader_opts(traversal_limit_in_words, nesting_limit))
 * 
 *         self._port = 0             # <<<<<<<<<<<<<<
 * 
 *         if bootstrap:
 */
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GOTREF(__pyx_v_self->_port);
  __Pyx_DECREF(__pyx_v_self->_port);
  __pyx_v_self->_port = __pyx_int_0;

  /* "capnp/lib/capnp.pyx":2397
 *         self._port = 0
 * 
 *         if bootstrap:             # <<<<<<<<<<<<<<
 *             self._bootstrap = bootstrap
 *             schema = bootstrap.schema
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_bootstrap); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2397, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":2398
 * 
 *         if bootstrap:
 *             self._bootstrap = bootstrap             # <<<<<<<<<<<<<<
 *             schema = bootstrap.schema
 *             self.thisptr = new RpcSystem(makeRpcServerBootstrap(deref(self._network.thisptr), helpers.server_to_client(schema.thisptr, <PyObject *>bootstrap)))
 */
    __Pyx_INCREF(__pyx_v_bootstrap);
    __Pyx_GIVEREF(__pyx_v_bootstrap);
    __Pyx_GOTREF(__pyx_v_self->_bootstrap);
    __Pyx_DECREF(__pyx_v_self->_bootstrap);
    __pyx_v_self->_bootstrap = __pyx_v_bootstrap;

    /* "capnp/lib/capnp.pyx":2399
 *         if bootstrap:
 *             self._bootstrap = bootstrap
 *             schema = bootstrap.schema             # <<<<<<<<<<<<<<
 *             self.thisptr = new RpcSystem(makeRpcServerBootstrap(deref(self._network.thisptr), helpers.server_to_client(schema.thisptr, <PyObject *>bootstrap)))
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_bootstrap, __pyx_n_s_schema); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2399, __pyx_L1_error)
    __pyx_v_schema = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":2400
 *             self._bootstrap = bootstrap
 *             schema = bootstrap.schema
 *             self.thisptr = new RpcSystem(makeRpcServerBootstrap(deref(self._network.thisptr), helpers.server_to_client(schema.thisptr, <PyObject *>bootstrap)))             # <<<<<<<<<<<<<<
 * 
 *         Py_INCREF(self._orig_stream)
 */
    __pyx_v_self->thisptr = new  ::capnp::RpcSystem<capnp::rpc::twoparty::SturdyRefHostId>(makeRpcServer((*__pyx_v_self->_network->thisptr), server_to_client(__pyx_v_schema->thisptr, ((PyObject *)__pyx_v_bootstrap))));

    /* "capnp/lib/capnp.pyx":2397
 *         self._port = 0
 * 
 *         if bootstrap:             # <<<<<<<<<<<<<<
 *             self._bootstrap = bootstrap
 *             schema = bootstrap.schema
 */
  }

  /* "capnp/lib/capnp.pyx":2402
 *             self.thisptr = new RpcSystem(makeRpcServerBootstrap(deref(self._network.thisptr), helpers.server_to_client(schema.thisptr, <PyObject *>bootstrap)))
 * 
 *         Py_INCREF(self._orig_stream)             # <<<<<<<<<<<<<<
 *         Py_INCREF(self._stream)
 *         Py_INCREF(self._pipe)
 */
  __pyx_t_4 = __pyx_v_self->_orig_stream;
  __Pyx_INCREF(__pyx_t_4);
  Py_INCREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2403
 * 
 *         Py_INCREF(self._orig_stream)
 *         Py_INCREF(self._stream)             # <<<<<<<<<<<<<<
 *         Py_INCREF(self._pipe)
 *         Py_INCREF(self._bootstrap)
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->_stream);
  __Pyx_INCREF(__pyx_t_4);
  Py_INCREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2404
 *         Py_INCREF(self._orig_stream)
 *         Py_INCREF(self._stream)
 *         Py_INCREF(self._pipe)             # <<<<<<<<<<<<<<
 *         Py_INCREF(self._bootstrap)
 *         Py_INCREF(self._network)
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->_pipe);
  __Pyx_INCREF(__pyx_t_4);
  Py_INCREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2405
 *         Py_INCREF(self._stream)
 *         Py_INCREF(self._pipe)
 *         Py_INCREF(self._bootstrap)             # <<<<<<<<<<<<<<
 *         Py_INCREF(self._network)
 *         self._disconnect_promise = self.on_disconnect().then(self._decref)
 */
  __pyx_t_4 = __pyx_v_self->_bootstrap;
  __Pyx_INCREF(__pyx_t_4);
  Py_INCREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2406
 *         Py_INCREF(self._pipe)
 *         Py_INCREF(self._bootstrap)
 *         Py_INCREF(self._network)             # <<<<<<<<<<<<<<
 *         self._disconnect_promise = self.on_disconnect().then(self._decref)
 * 
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->_network);
  __Pyx_INCREF(__pyx_t_4);
  Py_INCREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2407
 *         Py_INCREF(self._bootstrap)
 *         Py_INCREF(self._network)
 *         self._disconnect_promise = self.on_disconnect().then(self._decref)             # <<<<<<<<<<<<<<
 * 
 *     async def read(self, bufsize):
 */
  try {
    __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self->__pyx_vtab)->on_disconnect(__pyx_v_self, 0);
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2407, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2407, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_then); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && 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_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->_disconnect_promise);
  __Pyx_DECREF(__pyx_v_self->_disconnect_promise);
  __pyx_v_self->_disconnect_promise = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2375
 *     cdef capnp.ErrorHandler _error_handler
 * 
 *     def __init__(self, socket=None, bootstrap=None, traversal_limit_in_words=None, nesting_limit=None):             # <<<<<<<<<<<<<<
 *         if not bootstrap:
 *             raise KjException("You must provide a bootstrap interface to a server constructor.")
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_schema);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_14TwoPartyServer_4generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":2409
 *         self._disconnect_promise = self.on_disconnect().then(self._decref)
 * 
 *     async def read(self, bufsize):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp reader (asyncio sockets only)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_3read(PyObject *__pyx_v_self, PyObject *__pyx_v_bufsize); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_2read[] = "TwoPartyServer.read(self, bufsize)\n\n        libcapnp reader (asyncio sockets only)\n\n        :param bufsize: Buffer size to read from the libcapnp library\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_3read(PyObject *__pyx_v_self, PyObject *__pyx_v_bufsize) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_2read(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v_bufsize));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_2read(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_bufsize) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_4_read(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_4_read, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2409, __pyx_L1_error)
  } else {
    __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_cur_scope->__pyx_v_bufsize = __pyx_v_bufsize;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_bufsize);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_bufsize);
  {
    __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_14TwoPartyServer_4generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_read, __pyx_n_s_TwoPartyServer_read, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 2409, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer.read", __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_5capnp_3lib_5capnp_14TwoPartyServer_4generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  size_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_await;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2409, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2418
 *             self._pipe._pipe.ends[1].get(),
 *             &self._pipe._event_loop.thisptr.waitScope,
 *             bufsize             # <<<<<<<<<<<<<<
 *         )
 *         while not reader.poll():
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_cur_scope->__pyx_v_bufsize); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2418, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2415
 *         :param bufsize: Buffer size to read from the libcapnp library
 *         """
 *         cdef AsyncIoStreamReadHelper *reader = new AsyncIoStreamReadHelper(             # <<<<<<<<<<<<<<
 *             self._pipe._pipe.ends[1].get(),
 *             &self._pipe._event_loop.thisptr.waitScope,
 */
  __pyx_cur_scope->__pyx_v_reader = new AsyncIoStreamReadHelper((__pyx_cur_scope->__pyx_v_self->_pipe->_pipe.ends[1]).get(), (&__pyx_cur_scope->__pyx_v_self->_pipe->_event_loop->thisptr->waitScope), __pyx_t_1);

  /* "capnp/lib/capnp.pyx":2420
 *             bufsize
 *         )
 *         while not reader.poll():             # <<<<<<<<<<<<<<
 *             await asyncio.sleep(0.01)
 * 
 */
  while (1) {
    __pyx_t_2 = ((!(__pyx_cur_scope->__pyx_v_reader->poll() != 0)) != 0);
    if (!__pyx_t_2) break;

    /* "capnp/lib/capnp.pyx":2421
 *         )
 *         while not reader.poll():
 *             await asyncio.sleep(0.01)             # <<<<<<<<<<<<<<
 * 
 *         cdef array.array read_buffer = array.array('b', [])
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sleep); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_float_0_01);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XGOTREF(__pyx_r);
    if (likely(__pyx_r)) {
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, awaiting value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L6_resume_from_await:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2421, __pyx_L1_error)
    } else {
      PyObject* exc_type = __Pyx_PyErr_Occurred();
      if (exc_type) {
        if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
        else __PYX_ERR(0, 2421, __pyx_L1_error)
      }
    }
  }

  /* "capnp/lib/capnp.pyx":2423
 *             await asyncio.sleep(0.01)
 * 
 *         cdef array.array read_buffer = array.array('b', [])             # <<<<<<<<<<<<<<
 *         array.resize(read_buffer, reader.read_size())
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_b);
  __Pyx_GIVEREF(__pyx_n_s_b);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_b);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_read_buffer = ((arrayobject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2424
 * 
 *         cdef array.array read_buffer = array.array('b', [])
 *         array.resize(read_buffer, reader.read_size())             # <<<<<<<<<<<<<<
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())
 *         del reader
 */
  __pyx_t_6 = resize(__pyx_cur_scope->__pyx_v_read_buffer, __pyx_cur_scope->__pyx_v_reader->read_size()); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2424, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2425
 *         cdef array.array read_buffer = array.array('b', [])
 *         array.resize(read_buffer, reader.read_size())
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())             # <<<<<<<<<<<<<<
 *         del reader
 *         return read_buffer
 */
  (void)(memcpy(__pyx_cur_scope->__pyx_v_read_buffer->data.as_voidptr, __pyx_cur_scope->__pyx_v_reader->read_buffer(), __pyx_cur_scope->__pyx_v_reader->read_size()));

  /* "capnp/lib/capnp.pyx":2426
 *         array.resize(read_buffer, reader.read_size())
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())
 *         del reader             # <<<<<<<<<<<<<<
 *         return read_buffer
 * 
 */
  delete __pyx_cur_scope->__pyx_v_reader;

  /* "capnp/lib/capnp.pyx":2427
 *         memcpy(read_buffer.data.as_voidptr, reader.read_buffer(), reader.read_size())
 *         del reader
 *         return read_buffer             # <<<<<<<<<<<<<<
 * 
 *     async def write(self, data):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = NULL; __Pyx_ReturnWithStopIteration(((PyObject *)__pyx_cur_scope->__pyx_v_read_buffer));
  goto __pyx_L0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "capnp/lib/capnp.pyx":2409
 *         self._disconnect_promise = self.on_disconnect().then(self._decref)
 * 
 *     async def read(self, bufsize):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp reader (asyncio sockets only)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_14TwoPartyServer_7generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":2429
 *         return read_buffer
 * 
 *     async def write(self, data):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp writer (asyncio sockets only)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_6write(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_5write[] = "TwoPartyServer.write(self, data)\n\n        libcapnp writer (asyncio sockets only)\n\n        :param data: Buffer to write to the libcapnp library\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_6write(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5write(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v_data));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5write(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_data) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("write", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_5_write(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_5_write, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2429, __pyx_L1_error)
  } else {
    __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_cur_scope->__pyx_v_data = __pyx_v_data;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data);
  {
    __pyx_CoroutineObject *gen = __Pyx_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_14TwoPartyServer_7generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_write, __pyx_n_s_TwoPartyServer_write, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 2429, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer.write", __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_5capnp_3lib_5capnp_14TwoPartyServer_7generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("write", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2429, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2435
 *         :param data: Buffer to write to the libcapnp library
 *         """
 *         cdef array.array write_buffer = array.array('b', data)             # <<<<<<<<<<<<<<
 *         deref(self._pipe._pipe.ends[1]).write(
 *             write_buffer.data.as_voidptr,
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_b);
  __Pyx_GIVEREF(__pyx_n_s_b);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_b);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_data);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_data);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7cpython_5array_array), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_cur_scope->__pyx_v_write_buffer = ((arrayobject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2438
 *         deref(self._pipe._pipe.ends[1]).write(
 *             write_buffer.data.as_voidptr,
 *             len(data)             # <<<<<<<<<<<<<<
 *         ).wait(self._pipe._event_loop.thisptr.waitScope)
 * 
 */
  __pyx_t_3 = PyObject_Length(__pyx_cur_scope->__pyx_v_data); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2438, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2439
 *             write_buffer.data.as_voidptr,
 *             len(data)
 *         ).wait(self._pipe._event_loop.thisptr.waitScope)             # <<<<<<<<<<<<<<
 * 
 *     cpdef _connect(self, host_string, bootstrap, traversal_limit_in_words, nesting_limit):
 */
  (*(__pyx_cur_scope->__pyx_v_self->_pipe->_pipe.ends[1])).write(__pyx_cur_scope->__pyx_v_write_buffer->data.as_voidptr, __pyx_t_3).wait(__pyx_cur_scope->__pyx_v_self->_pipe->_event_loop->thisptr->waitScope);
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "capnp/lib/capnp.pyx":2429
 *         return read_buffer
 * 
 *     async def write(self, data):             # <<<<<<<<<<<<<<
 *         """
 *         libcapnp writer (asyncio sockets only)
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("write", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2441
 *         ).wait(self._pipe._event_loop.thisptr.waitScope)
 * 
 *     cpdef _connect(self, host_string, bootstrap, traversal_limit_in_words, nesting_limit):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         cdef _InterfaceSchema schema
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_9_connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer__connect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_host_string, PyObject *__pyx_v_bootstrap, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, int __pyx_skip_dispatch) {
   ::capnp::ReaderOptions __pyx_v_opts;
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_schema = 0;
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *__pyx_v_loop = 0;
   ::kj::StringPtr __pyx_v_temp_string;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_connect", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_connect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_9_connect)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_host_string, __pyx_v_bootstrap, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2441, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_v_host_string, __pyx_v_bootstrap, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2441, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2441, __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(__pyx_v_host_string);
          __Pyx_GIVEREF(__pyx_v_host_string);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_host_string);
          __Pyx_INCREF(__pyx_v_bootstrap);
          __Pyx_GIVEREF(__pyx_v_bootstrap);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_bootstrap);
          __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
          __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_traversal_limit_in_words);
          __Pyx_INCREF(__pyx_v_nesting_limit);
          __Pyx_GIVEREF(__pyx_v_nesting_limit);
          PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_nesting_limit);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2441, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2442
 * 
 *     cpdef _connect(self, host_string, bootstrap, traversal_limit_in_words, nesting_limit):
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *         cdef _InterfaceSchema schema
 *         cdef _EventLoop loop = C_DEFAULT_EVENT_LOOP_GETTER()
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":2444
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         cdef _InterfaceSchema schema
 *         cdef _EventLoop loop = C_DEFAULT_EVENT_LOOP_GETTER()             # <<<<<<<<<<<<<<
 *         cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>host_string, len(host_string))
 *         self._task_set = new capnp.TaskSet(self._error_handler)
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2445
 *         cdef _InterfaceSchema schema
 *         cdef _EventLoop loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *         cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>host_string, len(host_string))             # <<<<<<<<<<<<<<
 *         self._task_set = new capnp.TaskSet(self._error_handler)
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_host_string); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2445, __pyx_L1_error)
  __pyx_t_8 = PyObject_Length(__pyx_v_host_string); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2445, __pyx_L1_error)
  __pyx_v_temp_string =  ::kj::StringPtr(((char *)__pyx_t_7), __pyx_t_8);

  /* "capnp/lib/capnp.pyx":2446
 *         cdef _EventLoop loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *         cdef capnp.StringPtr temp_string = capnp.StringPtr(<char*>host_string, len(host_string))
 *         self._task_set = new capnp.TaskSet(self._error_handler)             # <<<<<<<<<<<<<<
 * 
 *         self._bootstrap = bootstrap
 */
  __pyx_v_self->_task_set = new  ::kj::TaskSet(__pyx_v_self->_error_handler);

  /* "capnp/lib/capnp.pyx":2448
 *         self._task_set = new capnp.TaskSet(self._error_handler)
 * 
 *         self._bootstrap = bootstrap             # <<<<<<<<<<<<<<
 *         Py_INCREF(self._bootstrap)
 *         schema = bootstrap.schema
 */
  __Pyx_INCREF(__pyx_v_bootstrap);
  __Pyx_GIVEREF(__pyx_v_bootstrap);
  __Pyx_GOTREF(__pyx_v_self->_bootstrap);
  __Pyx_DECREF(__pyx_v_self->_bootstrap);
  __pyx_v_self->_bootstrap = __pyx_v_bootstrap;

  /* "capnp/lib/capnp.pyx":2449
 * 
 *         self._bootstrap = bootstrap
 *         Py_INCREF(self._bootstrap)             # <<<<<<<<<<<<<<
 *         schema = bootstrap.schema
 *         self.port_promise = _Promise()._init(helpers.connectServer(deref(self._task_set), helpers.server_to_client(schema.thisptr, <PyObject *>bootstrap), loop.thisptr, temp_string, opts))
 */
  __pyx_t_1 = __pyx_v_self->_bootstrap;
  __Pyx_INCREF(__pyx_t_1);
  Py_INCREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2450
 *         self._bootstrap = bootstrap
 *         Py_INCREF(self._bootstrap)
 *         schema = bootstrap.schema             # <<<<<<<<<<<<<<
 *         self.port_promise = _Promise()._init(helpers.connectServer(deref(self._task_set), helpers.server_to_client(schema.thisptr, <PyObject *>bootstrap), loop.thisptr, temp_string, opts))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_bootstrap, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2450, __pyx_L1_error)
  __pyx_v_schema = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2451
 *         Py_INCREF(self._bootstrap)
 *         schema = bootstrap.schema
 *         self.port_promise = _Promise()._init(helpers.connectServer(deref(self._task_set), helpers.server_to_client(schema.thisptr, <PyObject *>bootstrap), loop.thisptr, temp_string, opts))             # <<<<<<<<<<<<<<
 * 
 *     def _decref(self):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__Promise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise *)((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__Promise *)__pyx_t_1), connectServer((*__pyx_v_self->_task_set), server_to_client(__pyx_v_schema->thisptr, ((PyObject *)__pyx_v_bootstrap)), __pyx_v_loop->thisptr, __pyx_v_temp_string, __pyx_v_opts), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->port_promise);
  __Pyx_DECREF(__pyx_v_self->port_promise);
  __pyx_v_self->port_promise = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2441
 *         ).wait(self._pipe._event_loop.thisptr.waitScope)
 * 
 *     cpdef _connect(self, host_string, bootstrap, traversal_limit_in_words, nesting_limit):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         cdef _InterfaceSchema schema
 */

  /* 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_6);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer._connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_schema);
  __Pyx_XDECREF((PyObject *)__pyx_v_loop);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_9_connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_8_connect[] = "TwoPartyServer._connect(self, host_string, bootstrap, traversal_limit_in_words, nesting_limit)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_9_connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_host_string = 0;
  PyObject *__pyx_v_bootstrap = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_connect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_host_string,&__pyx_n_s_bootstrap,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_host_string)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bootstrap)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_connect", 1, 4, 4, 1); __PYX_ERR(0, 2441, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_connect", 1, 4, 4, 2); __PYX_ERR(0, 2441, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_connect", 1, 4, 4, 3); __PYX_ERR(0, 2441, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_connect") < 0)) __PYX_ERR(0, 2441, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_host_string = values[0];
    __pyx_v_bootstrap = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_connect", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2441, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer._connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_connect(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), __pyx_v_host_string, __pyx_v_bootstrap, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_connect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_host_string, PyObject *__pyx_v_bootstrap, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  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("_connect", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14TwoPartyServer__connect(__pyx_v_self, __pyx_v_host_string, __pyx_v_bootstrap, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __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("capnp.lib.capnp.TwoPartyServer._connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2453
 *         self.port_promise = _Promise()._init(helpers.connectServer(deref(self._task_set), helpers.server_to_client(schema.thisptr, <PyObject *>bootstrap), loop.thisptr, temp_string, opts))
 * 
 *     def _decref(self):             # <<<<<<<<<<<<<<
 *         Py_DECREF(self._bootstrap)
 *         Py_INCREF(self._pipe)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_11_decref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_10_decref[] = "TwoPartyServer._decref(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_11_decref(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_decref (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_decref(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_decref(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("_decref", 0);

  /* "capnp/lib/capnp.pyx":2454
 * 
 *     def _decref(self):
 *         Py_DECREF(self._bootstrap)             # <<<<<<<<<<<<<<
 *         Py_INCREF(self._pipe)
 *         Py_DECREF(self._orig_stream)
 */
  __pyx_t_1 = __pyx_v_self->_bootstrap;
  __Pyx_INCREF(__pyx_t_1);
  Py_DECREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2455
 *     def _decref(self):
 *         Py_DECREF(self._bootstrap)
 *         Py_INCREF(self._pipe)             # <<<<<<<<<<<<<<
 *         Py_DECREF(self._orig_stream)
 *         Py_DECREF(self._stream)
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_pipe);
  __Pyx_INCREF(__pyx_t_1);
  Py_INCREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2456
 *         Py_DECREF(self._bootstrap)
 *         Py_INCREF(self._pipe)
 *         Py_DECREF(self._orig_stream)             # <<<<<<<<<<<<<<
 *         Py_DECREF(self._stream)
 *         Py_DECREF(self._network)
 */
  __pyx_t_1 = __pyx_v_self->_orig_stream;
  __Pyx_INCREF(__pyx_t_1);
  Py_DECREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2457
 *         Py_INCREF(self._pipe)
 *         Py_DECREF(self._orig_stream)
 *         Py_DECREF(self._stream)             # <<<<<<<<<<<<<<
 *         Py_DECREF(self._network)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_stream);
  __Pyx_INCREF(__pyx_t_1);
  Py_DECREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2458
 *         Py_DECREF(self._orig_stream)
 *         Py_DECREF(self._stream)
 *         Py_DECREF(self._network)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_network);
  __Pyx_INCREF(__pyx_t_1);
  Py_DECREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2453
 *         self.port_promise = _Promise()._init(helpers.connectServer(deref(self._task_set), helpers.server_to_client(schema.thisptr, <PyObject *>bootstrap), loop.thisptr, temp_string, opts))
 * 
 *     def _decref(self):             # <<<<<<<<<<<<<<
 *         Py_DECREF(self._bootstrap)
 *         Py_INCREF(self._pipe)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2460
 *         Py_DECREF(self._network)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         del self._task_set
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_13__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_13__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":2461
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 *         del self._task_set
 * 
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":2462
 *     def __dealloc__(self):
 *         del self.thisptr
 *         del self._task_set             # <<<<<<<<<<<<<<
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:
 */
  delete __pyx_v_self->_task_set;

  /* "capnp/lib/capnp.pyx":2460
 *         Py_DECREF(self._network)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         del self._task_set
 */

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

/* "capnp/lib/capnp.pyx":2464
 *         del self._task_set
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_15on_disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("on_disconnect", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_on_disconnect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_15on_disconnect)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2464, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2465
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())             # <<<<<<<<<<<<<<
 * 
 *     def poll_once(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__VoidPromise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise *)((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1), (*__pyx_v_self->_network->thisptr).onDisconnect(), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2465, __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;

  /* "capnp/lib/capnp.pyx":2464
 *         del self._task_set
 * 
 *     cpdef on_disconnect(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())
 * 
 */

  /* 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("capnp.lib.capnp.TwoPartyServer.on_disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_15on_disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_14on_disconnect[] = "TwoPartyServer.on_disconnect(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_15on_disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("on_disconnect (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_14on_disconnect(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_14on_disconnect(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__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("on_disconnect", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_on_disconnect(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2464, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2464, __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("capnp.lib.capnp.TwoPartyServer.on_disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2467
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())
 * 
 *     def poll_once(self):             # <<<<<<<<<<<<<<
 *         """
 *         Poll libcapnp library one cycle.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_17poll_once(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_16poll_once[] = "TwoPartyServer.poll_once(self)\n\n        Poll libcapnp library one cycle.\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_17poll_once(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("poll_once (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_16poll_once(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_16poll_once(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("poll_once", 0);

  /* "capnp/lib/capnp.pyx":2471
 *         Poll libcapnp library one cycle.
 *         """
 *         return poll_once()             # <<<<<<<<<<<<<<
 * 
 *     async def poll_forever(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_poll_once); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2471, __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;

  /* "capnp/lib/capnp.pyx":2467
 *         return _VoidPromise()._init(deref(self._network.thisptr).onDisconnect())
 * 
 *     def poll_once(self):             # <<<<<<<<<<<<<<
 *         """
 *         Poll libcapnp library one cycle.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer.poll_once", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_14TwoPartyServer_20generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":2473
 *         return poll_once()
 * 
 *     async def poll_forever(self):             # <<<<<<<<<<<<<<
 *         """
 *         Poll libcapnp library forever (asyncio)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19poll_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_18poll_forever[] = "TwoPartyServer.poll_forever(self)\n\n        Poll libcapnp library forever (asyncio)\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19poll_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("poll_forever (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_18poll_forever(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_18poll_forever(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("poll_forever", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2473, __pyx_L1_error)
  } else {
    __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_Coroutine_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_14TwoPartyServer_20generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_poll_forever, __pyx_n_s_TwoPartyServer_poll_forever, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 2473, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer.poll_forever", __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_5capnp_3lib_5capnp_14TwoPartyServer_20generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("poll_forever", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_await;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2473, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2477
 *         Poll libcapnp library forever (asyncio)
 *         """
 *         while True:             # <<<<<<<<<<<<<<
 *             poll_once()
 *             await asyncio.sleep(0.01)
 */
  while (1) {

    /* "capnp/lib/capnp.pyx":2478
 *         """
 *         while True:
 *             poll_once()             # <<<<<<<<<<<<<<
 *             await asyncio.sleep(0.01)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_poll_once); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2478, __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;

    /* "capnp/lib/capnp.pyx":2479
 *         while True:
 *             poll_once()
 *             await asyncio.sleep(0.01)             # <<<<<<<<<<<<<<
 * 
 *     cpdef run_forever(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sleep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_float_0_01) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_float_0_01);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XGOTREF(__pyx_r);
    if (likely(__pyx_r)) {
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
      /* return from generator, awaiting value */
      __pyx_generator->resume_label = 1;
      return __pyx_r;
      __pyx_L6_resume_from_await:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2479, __pyx_L1_error)
    } else {
      PyObject* exc_type = __Pyx_PyErr_Occurred();
      if (exc_type) {
        if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit && __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();
        else __PYX_ERR(0, 2479, __pyx_L1_error)
      }
    }
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "capnp/lib/capnp.pyx":2473
 *         return poll_once()
 * 
 *     async def poll_forever(self):             # <<<<<<<<<<<<<<
 *         """
 *         Poll libcapnp library forever (asyncio)
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("poll_forever", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2481
 *             await asyncio.sleep(0.01)
 * 
 *     cpdef run_forever(self):             # <<<<<<<<<<<<<<
 *         if self.port_promise is None:
 *             raise KjException("You must pass a string as the socket parameter in __init__ to use this function")
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_22run_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_run_forever(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("run_forever", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_forever); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_22run_forever)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2481, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2482
 * 
 *     cpdef run_forever(self):
 *         if self.port_promise is None:             # <<<<<<<<<<<<<<
 *             raise KjException("You must pass a string as the socket parameter in __init__ to use this function")
 * 
 */
  __pyx_t_5 = (__pyx_v_self->port_promise == Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (unlikely(__pyx_t_6)) {

    /* "capnp/lib/capnp.pyx":2483
 *     cpdef run_forever(self):
 *         if self.port_promise is None:
 *             raise KjException("You must pass a string as the socket parameter in __init__ to use this function")             # <<<<<<<<<<<<<<
 * 
 *         wait_forever()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_KjException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_You_must_pass_a_string_as_the_so) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_You_must_pass_a_string_as_the_so);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2483, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":2482
 * 
 *     cpdef run_forever(self):
 *         if self.port_promise is None:             # <<<<<<<<<<<<<<
 *             raise KjException("You must pass a string as the socket parameter in __init__ to use this function")
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":2485
 *             raise KjException("You must pass a string as the socket parameter in __init__ to use this function")
 * 
 *         wait_forever()             # <<<<<<<<<<<<<<
 * 
 *     cpdef bootstrap(self) except +reraise_kj_exception:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_wait_forever); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2485, __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;

  /* "capnp/lib/capnp.pyx":2481
 *             await asyncio.sleep(0.01)
 * 
 *     cpdef run_forever(self):             # <<<<<<<<<<<<<<
 *         if self.port_promise is None:
 *             raise KjException("You must pass a string as the socket parameter in __init__ to use this function")
 */

  /* 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_AddTraceback("capnp.lib.capnp.TwoPartyServer.run_forever", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_22run_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_21run_forever[] = "TwoPartyServer.run_forever(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_22run_forever(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("run_forever (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_21run_forever(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_21run_forever(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__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("run_forever", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_run_forever(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2481, __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("capnp.lib.capnp.TwoPartyServer.run_forever", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2487
 *         wait_forever()
 * 
 *     cpdef bootstrap(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _CapabilityClient()._init(helpers.bootstrapHelperServer(deref(self.thisptr)), self)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_24bootstrap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_bootstrap(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bootstrap", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bootstrap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2487, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_24bootstrap)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2487, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2488
 * 
 *     cpdef bootstrap(self) except +reraise_kj_exception:
 *         return _CapabilityClient()._init(helpers.bootstrapHelperServer(deref(self.thisptr)), self)             # <<<<<<<<<<<<<<
 * 
 *     property port:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__CapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__CapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)__pyx_t_1), bootstrapHelperServer((*__pyx_v_self->thisptr)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2488, __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;

  /* "capnp/lib/capnp.pyx":2487
 *         wait_forever()
 * 
 *     cpdef bootstrap(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return _CapabilityClient()._init(helpers.bootstrapHelperServer(deref(self.thisptr)), self)
 * 
 */

  /* 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("capnp.lib.capnp.TwoPartyServer.bootstrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_24bootstrap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_23bootstrap[] = "TwoPartyServer.bootstrap(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_24bootstrap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bootstrap (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_23bootstrap(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_23bootstrap(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__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("bootstrap", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_bootstrap(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2487, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2487, __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("capnp.lib.capnp.TwoPartyServer.bootstrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2491
 * 
 *     property port:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._port is None:
 *                 self._port = self.port_promise.wait()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_4port_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_4port_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_4port___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_4port___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __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("__get__", 0);

  /* "capnp/lib/capnp.pyx":2492
 *     property port:
 *         def __get__(self):
 *             if self._port is None:             # <<<<<<<<<<<<<<
 *                 self._port = self.port_promise.wait()
 *                 return self._port
 */
  __pyx_t_1 = (__pyx_v_self->_port == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2493
 *         def __get__(self):
 *             if self._port is None:
 *                 self._port = self.port_promise.wait()             # <<<<<<<<<<<<<<
 *                 return self._port
 *             else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->port_promise, __pyx_n_s_wait); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_port);
    __Pyx_DECREF(__pyx_v_self->_port);
    __pyx_v_self->_port = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":2494
 *             if self._port is None:
 *                 self._port = self.port_promise.wait()
 *                 return self._port             # <<<<<<<<<<<<<<
 *             else:
 *                 return self._port
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_port);
    __pyx_r = __pyx_v_self->_port;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2492
 *     property port:
 *         def __get__(self):
 *             if self._port is None:             # <<<<<<<<<<<<<<
 *                 self._port = self.port_promise.wait()
 *                 return self._port
 */
  }

  /* "capnp/lib/capnp.pyx":2496
 *                 return self._port
 *             else:
 *                 return self._port             # <<<<<<<<<<<<<<
 * 
 * cdef class _AsyncIoStream:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->_port);
    __pyx_r = __pyx_v_self->_port;
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":2491
 * 
 *     property port:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self._port is None:
 *                 self._port = self.port_promise.wait()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer.port.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2366
 *     """
 *     cdef RpcSystem * thisptr
 *     cdef public _TwoPartyVatNetwork _network             # <<<<<<<<<<<<<<
 *     cdef public object _orig_stream, _disconnect_promise
 *     cdef public _AsyncIoStream _stream
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_8_network_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_8_network_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_network___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_network___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_network));
  __pyx_r = ((PyObject *)__pyx_v_self->_network);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_8_network_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_8_network_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_network_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_network_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork))))) __PYX_ERR(0, 2366, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_network);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_network));
  __pyx_v_self->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer._network.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_8_network_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_8_network_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_network_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_8_network_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_network);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_network));
  __pyx_v_self->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)Py_None);

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

/* "capnp/lib/capnp.pyx":2367
 *     cdef RpcSystem * thisptr
 *     cdef public _TwoPartyVatNetwork _network
 *     cdef public object _orig_stream, _disconnect_promise             # <<<<<<<<<<<<<<
 *     cdef public _AsyncIoStream _stream
 *     cdef public _TwoWayPipe _pipe
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_orig_stream);
  __pyx_r = __pyx_v_self->_orig_stream;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_orig_stream);
  __Pyx_DECREF(__pyx_v_self->_orig_stream);
  __pyx_v_self->_orig_stream = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_orig_stream);
  __Pyx_DECREF(__pyx_v_self->_orig_stream);
  __pyx_v_self->_orig_stream = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_disconnect_promise);
  __pyx_r = __pyx_v_self->_disconnect_promise;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_disconnect_promise);
  __Pyx_DECREF(__pyx_v_self->_disconnect_promise);
  __pyx_v_self->_disconnect_promise = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_disconnect_promise);
  __Pyx_DECREF(__pyx_v_self->_disconnect_promise);
  __pyx_v_self->_disconnect_promise = Py_None;

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

/* "capnp/lib/capnp.pyx":2368
 *     cdef public _TwoPartyVatNetwork _network
 *     cdef public object _orig_stream, _disconnect_promise
 *     cdef public _AsyncIoStream _stream             # <<<<<<<<<<<<<<
 *     cdef public _TwoWayPipe _pipe
 *     cdef object _port
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_7_stream___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_7_stream___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_stream));
  __pyx_r = ((PyObject *)__pyx_v_self->_stream);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream))))) __PYX_ERR(0, 2368, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_stream);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_stream));
  __pyx_v_self->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer._stream.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_stream);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_stream));
  __pyx_v_self->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)Py_None);

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

/* "capnp/lib/capnp.pyx":2369
 *     cdef public object _orig_stream, _disconnect_promise
 *     cdef public _AsyncIoStream _stream
 *     cdef public _TwoWayPipe _pipe             # <<<<<<<<<<<<<<
 *     cdef object _port
 *     cdef public object port_promise, _bootstrap
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_pipe));
  __pyx_r = ((PyObject *)__pyx_v_self->_pipe);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__TwoWayPipe))))) __PYX_ERR(0, 2369, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_pipe);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_pipe));
  __pyx_v_self->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer._pipe.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_pipe);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_pipe));
  __pyx_v_self->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)Py_None);

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

/* "capnp/lib/capnp.pyx":2371
 *     cdef public _TwoWayPipe _pipe
 *     cdef object _port
 *     cdef public object port_promise, _bootstrap             # <<<<<<<<<<<<<<
 *     cdef capnp.TaskSet * _task_set
 *     cdef capnp.ErrorHandler _error_handler
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->port_promise);
  __pyx_r = __pyx_v_self->port_promise;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->port_promise);
  __Pyx_DECREF(__pyx_v_self->port_promise);
  __pyx_v_self->port_promise = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->port_promise);
  __Pyx_DECREF(__pyx_v_self->port_promise);
  __pyx_v_self->port_promise = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap___get__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap___get__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_bootstrap);
  __pyx_r = __pyx_v_self->_bootstrap;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_bootstrap);
  __Pyx_DECREF(__pyx_v_self->_bootstrap);
  __pyx_v_self->_bootstrap = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_bootstrap);
  __Pyx_DECREF(__pyx_v_self->_bootstrap);
  __pyx_v_self->_bootstrap = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_26__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_25__reduce_cython__[] = "TwoPartyServer.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_26__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_25__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_25__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_28__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_27__setstate_cython__[] = "TwoPartyServer.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_28__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_27__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14TwoPartyServer_27__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.TwoPartyServer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_AsyncIoStream_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_AsyncIoStream___reduce_cython__[] = "_AsyncIoStream.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_AsyncIoStream_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_AsyncIoStream___reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_AsyncIoStream___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._AsyncIoStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_AsyncIoStream_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_AsyncIoStream_2__setstate_cython__[] = "_AsyncIoStream.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_AsyncIoStream_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_AsyncIoStream_2__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_AsyncIoStream_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._AsyncIoStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2505
 *     cdef TwoWayPipe _pipe
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._init()
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe___init__(((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe___init__(struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":2506
 * 
 *     def __init__(self):
 *         self._init()             # <<<<<<<<<<<<<<
 * 
 *     cpdef _init(self) except +reraise_kj_exception:
 */
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_v_self->__pyx_vtab)->_init(__pyx_v_self, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2506, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2506, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2505
 *     cdef TwoWayPipe _pipe
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self._init()
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._TwoWayPipe.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2508
 *         self._init()
 * 
 *     cpdef _init(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *         # Create two way pipe using AsyncIoContext
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_3_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_11_TwoWayPipe__init(struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2508, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_3_init)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2508, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2509
 * 
 *     cpdef _init(self) except +reraise_kj_exception:
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()             # <<<<<<<<<<<<<<
 *         # Create two way pipe using AsyncIoContext
 *         self._pipe = self._event_loop.makeTwoWayPipe()
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_event_loop);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_event_loop));
  __pyx_v_self->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2511
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *         # Create two way pipe using AsyncIoContext
 *         self._pipe = self._event_loop.makeTwoWayPipe()             # <<<<<<<<<<<<<<
 * 
 * cdef class _FdAsyncIoStream(_AsyncIoStream):
 */
  __pyx_v_self->_pipe = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__EventLoop *)__pyx_v_self->_event_loop->__pyx_vtab)->makeTwoWayPipe(__pyx_v_self->_event_loop);

  /* "capnp/lib/capnp.pyx":2508
 *         self._init()
 * 
 *     cpdef _init(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *         # Create two way pipe using AsyncIoContext
 */

  /* 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_AddTraceback("capnp.lib.capnp._TwoWayPipe._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_3_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_TwoWayPipe_2_init[] = "_TwoWayPipe._init(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_3_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe_2_init(((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe_2_init(struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__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("_init", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_11_TwoWayPipe__init(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2508, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2508, __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("capnp.lib.capnp._TwoWayPipe._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_TwoWayPipe_4__reduce_cython__[] = "_TwoWayPipe.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._TwoWayPipe.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_TwoWayPipe_6__setstate_cython__[] = "_TwoWayPipe.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_TwoWayPipe_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._TwoWayPipe.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2516
 *     cdef _EventLoop _event_loop
 * 
 *     def __init__(self, int fd):             # <<<<<<<<<<<<<<
 *         self._init(fd)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_16_FdAsyncIoStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_16_FdAsyncIoStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_fd;
  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_fd,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2516, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_fd = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2516, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2516, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._FdAsyncIoStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_FdAsyncIoStream___init__(((struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *)__pyx_v_self), __pyx_v_fd);

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

static int __pyx_pf_5capnp_3lib_5capnp_16_FdAsyncIoStream___init__(struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *__pyx_v_self, int __pyx_v_fd) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":2517
 * 
 *     def __init__(self, int fd):
 *         self._init(fd)             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, int fd) except +reraise_kj_exception:
 */
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__FdAsyncIoStream *)__pyx_v_self->__pyx_vtab)->_init(__pyx_v_self, __pyx_v_fd);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2517, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2517, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2516
 *     cdef _EventLoop _event_loop
 * 
 *     def __init__(self, int fd):             # <<<<<<<<<<<<<<
 *         self._init(fd)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FdAsyncIoStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2519
 *         self._init(fd)
 * 
 *     cdef _init(self, int fd) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *         self.thisptr = self._event_loop.wrapSocketFd(fd)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_16_FdAsyncIoStream__init(struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *__pyx_v_self, int __pyx_v_fd) {
  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("_init", 0);

  /* "capnp/lib/capnp.pyx":2520
 * 
 *     cdef _init(self, int fd) except +reraise_kj_exception:
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()             # <<<<<<<<<<<<<<
 *         self.thisptr = self._event_loop.wrapSocketFd(fd)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP_GETTER()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_event_loop);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_event_loop));
  __pyx_v_self->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2521
 *     cdef _init(self, int fd) except +reraise_kj_exception:
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *         self.thisptr = self._event_loop.wrapSocketFd(fd)             # <<<<<<<<<<<<<<
 * 
 * cdef class PyAsyncIoStream(_AsyncIoStream):
 */
  __pyx_v_self->__pyx_base.thisptr = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__EventLoop *)__pyx_v_self->_event_loop->__pyx_vtab)->wrapSocketFd(__pyx_v_self->_event_loop, __pyx_v_fd);

  /* "capnp/lib/capnp.pyx":2519
 *         self._init(fd)
 * 
 *     cdef _init(self, int fd) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         self._event_loop = C_DEFAULT_EVENT_LOOP_GETTER()
 *         self.thisptr = self._event_loop.wrapSocketFd(fd)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FdAsyncIoStream._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_FdAsyncIoStream_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16_FdAsyncIoStream_2__reduce_cython__[] = "_FdAsyncIoStream.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_FdAsyncIoStream_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_FdAsyncIoStream_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_FdAsyncIoStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FdAsyncIoStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_FdAsyncIoStream_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16_FdAsyncIoStream_4__setstate_cython__[] = "_FdAsyncIoStream.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_FdAsyncIoStream_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_FdAsyncIoStream_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_FdAsyncIoStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FdAsyncIoStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2524
 * 
 * cdef class PyAsyncIoStream(_AsyncIoStream):
 *     def __init__(self, int fd):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_15PyAsyncIoStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_15PyAsyncIoStream_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED int __pyx_v_fd;
  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_fd,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2524, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_fd = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2524, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2524, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.PyAsyncIoStream.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15PyAsyncIoStream___init__(((struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream *)__pyx_v_self), __pyx_v_fd);

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

static int __pyx_pf_5capnp_3lib_5capnp_15PyAsyncIoStream___init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream *__pyx_v_self, CYTHON_UNUSED int __pyx_v_fd) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15PyAsyncIoStream_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15PyAsyncIoStream_2__reduce_cython__[] = "PyAsyncIoStream.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15PyAsyncIoStream_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15PyAsyncIoStream_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15PyAsyncIoStream_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.PyAsyncIoStream.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15PyAsyncIoStream_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15PyAsyncIoStream_4__setstate_cython__[] = "PyAsyncIoStream.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15PyAsyncIoStream_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15PyAsyncIoStream_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15PyAsyncIoStream_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.PyAsyncIoStream.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2532
 *     cdef public _VoidPromise promise
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = copyPromiseFulfillerPair(newPromiseAndFulfiller())
 *         self.is_consumed = False
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair___init__(((struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair___init__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self) {
  int __pyx_r;
  __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("__init__", 0);

  /* "capnp/lib/capnp.pyx":2533
 * 
 *     def __init__(self):
 *         self.thisptr = copyPromiseFulfillerPair(newPromiseAndFulfiller())             # <<<<<<<<<<<<<<
 *         self.is_consumed = False
 *         self.promise = _VoidPromise()._init(moveVoidPromise(deref(self.thisptr).promise))
 */
  __pyx_v_self->thisptr =  ::kj::heap< ::kj::PromiseFulfillerPair<void> >( ::kj::newPromiseAndFulfiller<void>());

  /* "capnp/lib/capnp.pyx":2534
 *     def __init__(self):
 *         self.thisptr = copyPromiseFulfillerPair(newPromiseAndFulfiller())
 *         self.is_consumed = False             # <<<<<<<<<<<<<<
 *         self.promise = _VoidPromise()._init(moveVoidPromise(deref(self.thisptr).promise))
 * 
 */
  __pyx_v_self->is_consumed = 0;

  /* "capnp/lib/capnp.pyx":2535
 *         self.thisptr = copyPromiseFulfillerPair(newPromiseAndFulfiller())
 *         self.is_consumed = False
 *         self.promise = _VoidPromise()._init(moveVoidPromise(deref(self.thisptr).promise))             # <<<<<<<<<<<<<<
 * 
 *     cpdef fulfill(self):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__VoidPromise)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise *)((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1), std::move((*__pyx_v_self->thisptr).promise), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5capnp_3lib_5capnp__VoidPromise))))) __PYX_ERR(0, 2535, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->promise);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->promise));
  __pyx_v_self->promise = ((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2532
 *     cdef public _VoidPromise promise
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = copyPromiseFulfillerPair(newPromiseAndFulfiller())
 *         self.is_consumed = False
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp.PromiseFulfillerPair.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2537
 *         self.promise = _VoidPromise()._init(moveVoidPromise(deref(self.thisptr).promise))
 * 
 *     cpdef fulfill(self):             # <<<<<<<<<<<<<<
 *         deref(deref(self.thisptr).fulfiller).fulfill()
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_3fulfill(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_20PromiseFulfillerPair_fulfill(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fulfill", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fulfill); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2537, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_3fulfill)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2537, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2538
 * 
 *     cpdef fulfill(self):
 *         deref(deref(self.thisptr).fulfiller).fulfill()             # <<<<<<<<<<<<<<
 * 
 * cdef class _Schema:
 */
  (*(*__pyx_v_self->thisptr).fulfiller).fulfill();

  /* "capnp/lib/capnp.pyx":2537
 *         self.promise = _VoidPromise()._init(moveVoidPromise(deref(self.thisptr).promise))
 * 
 *     cpdef fulfill(self):             # <<<<<<<<<<<<<<
 *         deref(deref(self.thisptr).fulfiller).fulfill()
 * 
 */

  /* 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_AddTraceback("capnp.lib.capnp.PromiseFulfillerPair.fulfill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_3fulfill(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20PromiseFulfillerPair_2fulfill[] = "PromiseFulfillerPair.fulfill(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_3fulfill(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fulfill (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_2fulfill(((struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_2fulfill(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__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("fulfill", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_20PromiseFulfillerPair_fulfill(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2537, __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("capnp.lib.capnp.PromiseFulfillerPair.fulfill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2529
 * cdef class PromiseFulfillerPair:
 *     cdef Own[C_PromiseFulfillerPair] thisptr
 *     cdef public bint is_consumed             # <<<<<<<<<<<<<<
 *     cdef public _VoidPromise promise
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed___get__(((struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed___get__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_consumed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2529, __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("capnp.lib.capnp.PromiseFulfillerPair.is_consumed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2529, __pyx_L1_error)
  __pyx_v_self->is_consumed = __pyx_t_1;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.PromiseFulfillerPair.is_consumed.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2530
 *     cdef Own[C_PromiseFulfillerPair] thisptr
 *     cdef public bint is_consumed
 *     cdef public _VoidPromise promise             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise___get__(((struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise___get__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->promise));
  __pyx_r = ((PyObject *)__pyx_v_self->promise);
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5capnp_3lib_5capnp__VoidPromise))))) __PYX_ERR(0, 2530, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->promise);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->promise));
  __pyx_v_self->promise = ((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.PromiseFulfillerPair.promise.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->promise);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->promise));
  __pyx_v_self->promise = ((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)Py_None);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20PromiseFulfillerPair_4__reduce_cython__[] = "PromiseFulfillerPair.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.PromiseFulfillerPair.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20PromiseFulfillerPair_6__setstate_cython__[] = "PromiseFulfillerPair.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20PromiseFulfillerPair_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.PromiseFulfillerPair.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2541
 * 
 * cdef class _Schema:
 *     cdef _init(self, C_Schema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema__init(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self,  ::capnp::Schema __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":2542
 * cdef class _Schema:
 *     cdef _init(self, C_Schema other):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2543
 *     cdef _init(self, C_Schema other):
 *         self.thisptr = other
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_const_value(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2541
 * 
 * cdef class _Schema:
 *     cdef _init(self, C_Schema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":2545
 *         return self
 * 
 *     cpdef as_const_value(self):             # <<<<<<<<<<<<<<
 *         return to_python_reader(<C_DynamicValue.Reader>self.thisptr.asConst(), self)
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_1as_const_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_as_const_value(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::ConstSchema __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_const_value", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_const_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2545, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_7_Schema_1as_const_value)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2545, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2546
 * 
 *     cpdef as_const_value(self):
 *         return to_python_reader(<C_DynamicValue.Reader>self.thisptr.asConst(), self)             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_struct(self):
 */
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.asConst();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2546, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_to_python_reader((( ::capnp::DynamicValue::Reader)__pyx_t_5), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2545
 *         return self
 * 
 *     cpdef as_const_value(self):             # <<<<<<<<<<<<<<
 *         return to_python_reader(<C_DynamicValue.Reader>self.thisptr.asConst(), self)
 * 
 */

  /* 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("capnp.lib.capnp._Schema.as_const_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_1as_const_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_7_Schema_as_const_value[] = "_Schema.as_const_value(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_1as_const_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_const_value (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Schema_as_const_value(((struct __pyx_obj_5capnp_3lib_5capnp__Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_as_const_value(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__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("as_const_value", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_7_Schema_as_const_value(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2545, __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("capnp.lib.capnp._Schema.as_const_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2548
 *         return to_python_reader(<C_DynamicValue.Reader>self.thisptr.asConst(), self)
 * 
 *     cpdef as_struct(self):             # <<<<<<<<<<<<<<
 *         return _StructSchema()._init(self.thisptr.asStruct())
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_3as_struct(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_as_struct(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::StructSchema __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_struct", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2548, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_7_Schema_3as_struct)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2548, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2549
 * 
 *     cpdef as_struct(self):
 *         return _StructSchema()._init(self.thisptr.asStruct())             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_interface(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.asStruct();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2549, __pyx_L1_error)
  }
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1), __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2549, __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;

  /* "capnp/lib/capnp.pyx":2548
 *         return to_python_reader(<C_DynamicValue.Reader>self.thisptr.asConst(), self)
 * 
 *     cpdef as_struct(self):             # <<<<<<<<<<<<<<
 *         return _StructSchema()._init(self.thisptr.asStruct())
 * 
 */

  /* 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("capnp.lib.capnp._Schema.as_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_3as_struct(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_7_Schema_2as_struct[] = "_Schema.as_struct(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_3as_struct(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_struct (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Schema_2as_struct(((struct __pyx_obj_5capnp_3lib_5capnp__Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_2as_struct(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__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("as_struct", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_7_Schema_as_struct(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2548, __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("capnp.lib.capnp._Schema.as_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2551
 *         return _StructSchema()._init(self.thisptr.asStruct())
 * 
 *     cpdef as_interface(self):             # <<<<<<<<<<<<<<
 *         return _InterfaceSchema()._init(self.thisptr.asInterface())
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_5as_interface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_as_interface(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::InterfaceSchema __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_interface", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_interface); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2551, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_7_Schema_5as_interface)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2551, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2552
 * 
 *     cpdef as_interface(self):
 *         return _InterfaceSchema()._init(self.thisptr.asInterface())             # <<<<<<<<<<<<<<
 * 
 *     cpdef as_enum(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.asInterface();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2552, __pyx_L1_error)
  }
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1), __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2552, __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;

  /* "capnp/lib/capnp.pyx":2551
 *         return _StructSchema()._init(self.thisptr.asStruct())
 * 
 *     cpdef as_interface(self):             # <<<<<<<<<<<<<<
 *         return _InterfaceSchema()._init(self.thisptr.asInterface())
 * 
 */

  /* 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("capnp.lib.capnp._Schema.as_interface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_5as_interface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_7_Schema_4as_interface[] = "_Schema.as_interface(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_5as_interface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_interface (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Schema_4as_interface(((struct __pyx_obj_5capnp_3lib_5capnp__Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_4as_interface(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__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("as_interface", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_7_Schema_as_interface(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2551, __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("capnp.lib.capnp._Schema.as_interface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2554
 *         return _InterfaceSchema()._init(self.thisptr.asInterface())
 * 
 *     cpdef as_enum(self):             # <<<<<<<<<<<<<<
 *         return _EnumSchema()._init(self.thisptr.asEnum())
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_7as_enum(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_as_enum(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::EnumSchema __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("as_enum", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2554, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_7_Schema_7as_enum)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2554, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2555
 * 
 *     cpdef as_enum(self):
 *         return _EnumSchema()._init(self.thisptr.asEnum())             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_proto(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__EnumSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.asEnum();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2555, __pyx_L1_error)
  }
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__EnumSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)__pyx_t_1), __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2555, __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;

  /* "capnp/lib/capnp.pyx":2554
 *         return _InterfaceSchema()._init(self.thisptr.asInterface())
 * 
 *     cpdef as_enum(self):             # <<<<<<<<<<<<<<
 *         return _EnumSchema()._init(self.thisptr.asEnum())
 * 
 */

  /* 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("capnp.lib.capnp._Schema.as_enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_7as_enum(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_7_Schema_6as_enum[] = "_Schema.as_enum(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_7as_enum(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_enum (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Schema_6as_enum(((struct __pyx_obj_5capnp_3lib_5capnp__Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_6as_enum(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__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("as_enum", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_7_Schema_as_enum(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2554, __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("capnp.lib.capnp._Schema.as_enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2557
 *         return _EnumSchema()._init(self.thisptr.asEnum())
 * 
 *     cpdef get_proto(self):             # <<<<<<<<<<<<<<
 *         return _NodeReader().init(self.thisptr.getProto())
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_9get_proto(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_7_Schema_get_proto(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::schema::Node::Reader __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_proto", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_proto); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2557, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_7_Schema_9get_proto)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2558
 * 
 *     cpdef get_proto(self):
 *         return _NodeReader().init(self.thisptr.getProto())             # <<<<<<<<<<<<<<
 * 
 *     property node:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__NodeReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_5 = __pyx_v_self->thisptr.getProto();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2558, __pyx_L1_error)
  }
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__NodeReader *)((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)__pyx_t_1), __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __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;

  /* "capnp/lib/capnp.pyx":2557
 *         return _EnumSchema()._init(self.thisptr.asEnum())
 * 
 *     cpdef get_proto(self):             # <<<<<<<<<<<<<<
 *         return _NodeReader().init(self.thisptr.getProto())
 * 
 */

  /* 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("capnp.lib.capnp._Schema.get_proto", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_9get_proto(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_7_Schema_8get_proto[] = "_Schema.get_proto(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_9get_proto(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_proto (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Schema_8get_proto(((struct __pyx_obj_5capnp_3lib_5capnp__Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_8get_proto(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_proto", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_7_Schema_get_proto(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2557, __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("capnp.lib.capnp._Schema.get_proto", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2562
 *     property node:
 *         """The raw schema node"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_4node_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_4node_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Schema_4node___get__(((struct __pyx_obj_5capnp_3lib_5capnp__Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_4node___get__(struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
   ::capnp::schema::Node::Reader __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2563
 *         """The raw schema node"""
 *         def __get__(self):
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)             # <<<<<<<<<<<<<<
 * 
 * cdef class _StructSchema:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_2 = __pyx_v_self->thisptr.getProto();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2563, __pyx_L1_error)
  }
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1), (( ::capnp::DynamicStruct::Reader)__pyx_t_2), ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2562
 *     property node:
 *         """The raw schema node"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._Schema.node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_7_Schema_10__reduce_cython__[] = "_Schema.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Schema_10__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__Schema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Schema *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._Schema.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_7_Schema_12__setstate_cython__[] = "_Schema.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Schema_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Schema_12__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__Schema *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Schema_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__Schema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._Schema.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2569
 *     cdef object __fieldnames, __union_fields, __non_union_fields, __fields, __getters
 *     cdef list __fields_list
 *     cdef _init(self, C_StructSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self.__fieldnames = None
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_13_StructSchema__init(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self,  ::capnp::StructSchema __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":2570
 *     cdef list __fields_list
 *     cdef _init(self, C_StructSchema other):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self.__fieldnames = None
 *         self.__union_fields = None
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2571
 *     cdef _init(self, C_StructSchema other):
 *         self.thisptr = other
 *         self.__fieldnames = None             # <<<<<<<<<<<<<<
 *         self.__union_fields = None
 *         self.__non_union_fields = None
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->__pyx___fieldnames);
  __Pyx_DECREF(__pyx_v_self->__pyx___fieldnames);
  __pyx_v_self->__pyx___fieldnames = Py_None;

  /* "capnp/lib/capnp.pyx":2572
 *         self.thisptr = other
 *         self.__fieldnames = None
 *         self.__union_fields = None             # <<<<<<<<<<<<<<
 *         self.__non_union_fields = None
 *         self.__fields = None
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->__pyx___union_fields);
  __Pyx_DECREF(__pyx_v_self->__pyx___union_fields);
  __pyx_v_self->__pyx___union_fields = Py_None;

  /* "capnp/lib/capnp.pyx":2573
 *         self.__fieldnames = None
 *         self.__union_fields = None
 *         self.__non_union_fields = None             # <<<<<<<<<<<<<<
 *         self.__fields = None
 *         self.__fields_list = None
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->__pyx___non_union_fields);
  __Pyx_DECREF(__pyx_v_self->__pyx___non_union_fields);
  __pyx_v_self->__pyx___non_union_fields = Py_None;

  /* "capnp/lib/capnp.pyx":2574
 *         self.__union_fields = None
 *         self.__non_union_fields = None
 *         self.__fields = None             # <<<<<<<<<<<<<<
 *         self.__fields_list = None
 *         self.__getters = None
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->__pyx___fields);
  __Pyx_DECREF(__pyx_v_self->__pyx___fields);
  __pyx_v_self->__pyx___fields = Py_None;

  /* "capnp/lib/capnp.pyx":2575
 *         self.__non_union_fields = None
 *         self.__fields = None
 *         self.__fields_list = None             # <<<<<<<<<<<<<<
 *         self.__getters = None
 *         return self
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->__pyx___fields_list);
  __Pyx_DECREF(__pyx_v_self->__pyx___fields_list);
  __pyx_v_self->__pyx___fields_list = ((PyObject*)Py_None);

  /* "capnp/lib/capnp.pyx":2576
 *         self.__fields = None
 *         self.__fields_list = None
 *         self.__getters = None             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->__pyx___getters);
  __Pyx_DECREF(__pyx_v_self->__pyx___getters);
  __pyx_v_self->__pyx___getters = Py_None;

  /* "capnp/lib/capnp.pyx":2577
 *         self.__fields_list = None
 *         self.__getters = None
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property fieldnames:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2569
 *     cdef object __fieldnames, __union_fields, __non_union_fields, __fields, __getters
 *     cdef list __fields_list
 *     cdef _init(self, C_StructSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self.__fieldnames = None
 */

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

/* "capnp/lib/capnp.pyx":2581
 *     property fieldnames:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__fieldnames is not None:
 *                return self.__fieldnames
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_10fieldnames_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_10fieldnames_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_10fieldnames___get__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_13_StructSchema_10fieldnames_7__get___2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":2586
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 *             self.__fieldnames = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__fieldnames
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_10fieldnames_7__get___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2586, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_13_StructSchema_10fieldnames_7__get___2generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_StructSchema___get___locals_gen, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 2586, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.fieldnames.__get__.genexpr", __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_5capnp_3lib_5capnp_13_StructSchema_10fieldnames_7__get___2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 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_ERR(0, 2586, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2587
 *             nfields = fieldlist.size()
 *             self.__fieldnames = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))             # <<<<<<<<<<<<<<
 *             return self.__fieldnames
 * 
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_nfields;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "capnp/lib/capnp.pyx":2586
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 *             self.__fieldnames = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__fieldnames
 */
    __pyx_t_4 = __Pyx_PyStr_FromString(((char *)(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fieldlist[__pyx_cur_scope->__pyx_v_i]).getProto().getName().cStr())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2586, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2581
 *     property fieldnames:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__fieldnames is not None:
 *                return self.__fieldnames
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_10fieldnames___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *__pyx_cur_scope;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_7___get__(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_7___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2581, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "capnp/lib/capnp.pyx":2582
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):
 *             if self.__fieldnames is not None:             # <<<<<<<<<<<<<<
 *                return self.__fieldnames
 *             fieldlist = self.thisptr.getFields()
 */
  __pyx_t_1 = (__pyx_v_self->__pyx___fieldnames != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2583
 *         def __get__(self):
 *             if self.__fieldnames is not None:
 *                return self.__fieldnames             # <<<<<<<<<<<<<<
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx___fieldnames);
    __pyx_r = __pyx_v_self->__pyx___fieldnames;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2582
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):
 *             if self.__fieldnames is not None:             # <<<<<<<<<<<<<<
 *                return self.__fieldnames
 *             fieldlist = self.thisptr.getFields()
 */
  }

  /* "capnp/lib/capnp.pyx":2584
 *             if self.__fieldnames is not None:
 *                return self.__fieldnames
 *             fieldlist = self.thisptr.getFields()             # <<<<<<<<<<<<<<
 *             nfields = fieldlist.size()
 *             self.__fieldnames = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 */
  __pyx_cur_scope->__pyx_v_fieldlist = __pyx_v_self->thisptr.getFields();

  /* "capnp/lib/capnp.pyx":2585
 *                return self.__fieldnames
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()             # <<<<<<<<<<<<<<
 *             self.__fieldnames = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 */
  __pyx_cur_scope->__pyx_v_nfields = __pyx_cur_scope->__pyx_v_fieldlist.size();

  /* "capnp/lib/capnp.pyx":2586
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 *             self.__fieldnames = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__fieldnames
 */
  __pyx_t_3 = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_10fieldnames_7__get___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->__pyx___fieldnames);
  __Pyx_DECREF(__pyx_v_self->__pyx___fieldnames);
  __pyx_v_self->__pyx___fieldnames = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2588
 *             self.__fieldnames = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 *             return self.__fieldnames             # <<<<<<<<<<<<<<
 * 
 *     property union_fields:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx___fieldnames);
  __pyx_r = __pyx_v_self->__pyx___fieldnames;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2581
 *     property fieldnames:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__fieldnames is not None:
 *                return self.__fieldnames
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.fieldnames.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2592
 *     property union_fields:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__union_fields is not None:
 *                return self.__union_fields
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_12union_fields_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_12union_fields_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_12union_fields___get__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_13_StructSchema_12union_fields_7__get___2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":2597
 *             fieldlist = self.thisptr.getUnionFields()
 *             nfields = fieldlist.size()
 *             self.__union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__union_fields
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_12union_fields_7__get___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2597, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_13_StructSchema_12union_fields_7__get___2generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_StructSchema___get___locals_gen, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 2597, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.union_fields.__get__.genexpr", __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_5capnp_3lib_5capnp_13_StructSchema_12union_fields_7__get___2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 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_ERR(0, 2597, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2598
 *             nfields = fieldlist.size()
 *             self.__union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))             # <<<<<<<<<<<<<<
 *             return self.__union_fields
 * 
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_nfields;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "capnp/lib/capnp.pyx":2597
 *             fieldlist = self.thisptr.getUnionFields()
 *             nfields = fieldlist.size()
 *             self.__union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__union_fields
 */
    __pyx_t_4 = __Pyx_PyStr_FromString(((char *)(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fieldlist[__pyx_cur_scope->__pyx_v_i]).getProto().getName().cStr())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2597, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2592
 *     property union_fields:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__union_fields is not None:
 *                return self.__union_fields
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_12union_fields___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *__pyx_cur_scope;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_9___get__(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_9___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2592, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "capnp/lib/capnp.pyx":2593
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):
 *             if self.__union_fields is not None:             # <<<<<<<<<<<<<<
 *                return self.__union_fields
 *             fieldlist = self.thisptr.getUnionFields()
 */
  __pyx_t_1 = (__pyx_v_self->__pyx___union_fields != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2594
 *         def __get__(self):
 *             if self.__union_fields is not None:
 *                return self.__union_fields             # <<<<<<<<<<<<<<
 *             fieldlist = self.thisptr.getUnionFields()
 *             nfields = fieldlist.size()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx___union_fields);
    __pyx_r = __pyx_v_self->__pyx___union_fields;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2593
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):
 *             if self.__union_fields is not None:             # <<<<<<<<<<<<<<
 *                return self.__union_fields
 *             fieldlist = self.thisptr.getUnionFields()
 */
  }

  /* "capnp/lib/capnp.pyx":2595
 *             if self.__union_fields is not None:
 *                return self.__union_fields
 *             fieldlist = self.thisptr.getUnionFields()             # <<<<<<<<<<<<<<
 *             nfields = fieldlist.size()
 *             self.__union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 */
  __pyx_cur_scope->__pyx_v_fieldlist = __pyx_v_self->thisptr.getUnionFields();

  /* "capnp/lib/capnp.pyx":2596
 *                return self.__union_fields
 *             fieldlist = self.thisptr.getUnionFields()
 *             nfields = fieldlist.size()             # <<<<<<<<<<<<<<
 *             self.__union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 */
  __pyx_cur_scope->__pyx_v_nfields = __pyx_cur_scope->__pyx_v_fieldlist.size();

  /* "capnp/lib/capnp.pyx":2597
 *             fieldlist = self.thisptr.getUnionFields()
 *             nfields = fieldlist.size()
 *             self.__union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__union_fields
 */
  __pyx_t_3 = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_12union_fields_7__get___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->__pyx___union_fields);
  __Pyx_DECREF(__pyx_v_self->__pyx___union_fields);
  __pyx_v_self->__pyx___union_fields = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2599
 *             self.__union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 *             return self.__union_fields             # <<<<<<<<<<<<<<
 * 
 *     property non_union_fields:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx___union_fields);
  __pyx_r = __pyx_v_self->__pyx___union_fields;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2592
 *     property union_fields:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__union_fields is not None:
 *                return self.__union_fields
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.union_fields.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2603
 *     property non_union_fields:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__non_union_fields is not None:
 *                return self.__non_union_fields
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields___get__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields_7__get___2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":2608
 *             fieldlist = self.thisptr.getNonUnionFields()
 *             nfields = fieldlist.size()
 *             self.__non_union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__non_union_fields
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields_7__get___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2608, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields_7__get___2generator8, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_StructSchema___get___locals_gen, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 2608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.non_union_fields.__get__.genexpr", __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_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields_7__get___2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 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_ERR(0, 2608, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2609
 *             nfields = fieldlist.size()
 *             self.__non_union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))             # <<<<<<<<<<<<<<
 *             return self.__non_union_fields
 * 
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_nfields;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "capnp/lib/capnp.pyx":2608
 *             fieldlist = self.thisptr.getNonUnionFields()
 *             nfields = fieldlist.size()
 *             self.__non_union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__non_union_fields
 */
    __pyx_t_4 = __Pyx_PyStr_FromString(((char *)(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fieldlist[__pyx_cur_scope->__pyx_v_i]).getProto().getName().cStr())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2608, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2603
 *     property non_union_fields:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__non_union_fields is not None:
 *                return self.__non_union_fields
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *__pyx_cur_scope;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_11___get__(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_11___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2603, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "capnp/lib/capnp.pyx":2604
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):
 *             if self.__non_union_fields is not None:             # <<<<<<<<<<<<<<
 *                return self.__non_union_fields
 *             fieldlist = self.thisptr.getNonUnionFields()
 */
  __pyx_t_1 = (__pyx_v_self->__pyx___non_union_fields != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2605
 *         def __get__(self):
 *             if self.__non_union_fields is not None:
 *                return self.__non_union_fields             # <<<<<<<<<<<<<<
 *             fieldlist = self.thisptr.getNonUnionFields()
 *             nfields = fieldlist.size()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx___non_union_fields);
    __pyx_r = __pyx_v_self->__pyx___non_union_fields;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2604
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):
 *             if self.__non_union_fields is not None:             # <<<<<<<<<<<<<<
 *                return self.__non_union_fields
 *             fieldlist = self.thisptr.getNonUnionFields()
 */
  }

  /* "capnp/lib/capnp.pyx":2606
 *             if self.__non_union_fields is not None:
 *                return self.__non_union_fields
 *             fieldlist = self.thisptr.getNonUnionFields()             # <<<<<<<<<<<<<<
 *             nfields = fieldlist.size()
 *             self.__non_union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 */
  __pyx_cur_scope->__pyx_v_fieldlist = __pyx_v_self->thisptr.getNonUnionFields();

  /* "capnp/lib/capnp.pyx":2607
 *                return self.__non_union_fields
 *             fieldlist = self.thisptr.getNonUnionFields()
 *             nfields = fieldlist.size()             # <<<<<<<<<<<<<<
 *             self.__non_union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 */
  __pyx_cur_scope->__pyx_v_nfields = __pyx_cur_scope->__pyx_v_fieldlist.size();

  /* "capnp/lib/capnp.pyx":2608
 *             fieldlist = self.thisptr.getNonUnionFields()
 *             nfields = fieldlist.size()
 *             self.__non_union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__non_union_fields
 */
  __pyx_t_3 = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields_7__get___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->__pyx___non_union_fields);
  __Pyx_DECREF(__pyx_v_self->__pyx___non_union_fields);
  __pyx_v_self->__pyx___non_union_fields = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2610
 *             self.__non_union_fields = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 *             return self.__non_union_fields             # <<<<<<<<<<<<<<
 * 
 *     property fields:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx___non_union_fields);
  __pyx_r = __pyx_v_self->__pyx___non_union_fields;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2603
 *     property non_union_fields:
 *         """A tuple of the field names in the struct."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__non_union_fields is not None:
 *                return self.__non_union_fields
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.non_union_fields.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2614
 *     property fields:
 *         """All of the _StructSchemaField in this schema as a dict"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__fields is not None:
 *                return self.__fields
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_6fields_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_6fields_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_6fields___get__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_6fields___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self) {
   ::capnp::StructSchema::FieldList __pyx_v_fieldlist;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_nfields;
  __pyx_t_5capnp_8includes_5types_uint __pyx_8genexpr6__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_4;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_5;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2615
 *         """All of the _StructSchemaField in this schema as a dict"""
 *         def __get__(self):
 *             if self.__fields is not None:             # <<<<<<<<<<<<<<
 *                return self.__fields
 *             fieldlist = self.thisptr.getFields()
 */
  __pyx_t_1 = (__pyx_v_self->__pyx___fields != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2616
 *         def __get__(self):
 *             if self.__fields is not None:
 *                return self.__fields             # <<<<<<<<<<<<<<
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx___fields);
    __pyx_r = __pyx_v_self->__pyx___fields;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2615
 *         """All of the _StructSchemaField in this schema as a dict"""
 *         def __get__(self):
 *             if self.__fields is not None:             # <<<<<<<<<<<<<<
 *                return self.__fields
 *             fieldlist = self.thisptr.getFields()
 */
  }

  /* "capnp/lib/capnp.pyx":2617
 *             if self.__fields is not None:
 *                return self.__fields
 *             fieldlist = self.thisptr.getFields()             # <<<<<<<<<<<<<<
 *             nfields = fieldlist.size()
 *             self.__fields = {<char*>fieldlist[i].getProto().getName().cStr() : _StructSchemaField()._init(fieldlist[i], self)
 */
  __pyx_v_fieldlist = __pyx_v_self->thisptr.getFields();

  /* "capnp/lib/capnp.pyx":2618
 *                return self.__fields
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()             # <<<<<<<<<<<<<<
 *             self.__fields = {<char*>fieldlist[i].getProto().getName().cStr() : _StructSchemaField()._init(fieldlist[i], self)
 *                                       for i in xrange(nfields)}
 */
  __pyx_v_nfields = __pyx_v_fieldlist.size();

  /* "capnp/lib/capnp.pyx":2619
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 *             self.__fields = {<char*>fieldlist[i].getProto().getName().cStr() : _StructSchemaField()._init(fieldlist[i], self)             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields)}
 *             return self.__fields
 */
  { /* enter inner scope */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "capnp/lib/capnp.pyx":2620
 *             nfields = fieldlist.size()
 *             self.__fields = {<char*>fieldlist[i].getProto().getName().cStr() : _StructSchemaField()._init(fieldlist[i], self)
 *                                       for i in xrange(nfields)}             # <<<<<<<<<<<<<<
 *             return self.__fields
 * 
 */
    __pyx_t_4 = __pyx_v_nfields;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_8genexpr6__pyx_v_i = __pyx_t_6;

      /* "capnp/lib/capnp.pyx":2619
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 *             self.__fields = {<char*>fieldlist[i].getProto().getName().cStr() : _StructSchemaField()._init(fieldlist[i], self)             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields)}
 *             return self.__fields
 */
      __pyx_t_7 = __Pyx_PyStr_FromString(((char *)(__pyx_v_fieldlist[__pyx_8genexpr6__pyx_v_i]).getProto().getName().cStr())); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchemaField)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10.__pyx_n = 1;
      __pyx_t_10.parent = ((PyObject *)__pyx_v_self);
      __pyx_t_9 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchemaField *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_t_8)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_t_8), (__pyx_v_fieldlist[__pyx_8genexpr6__pyx_v_i]), &__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_t_7, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 2619, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->__pyx___fields);
  __Pyx_DECREF(__pyx_v_self->__pyx___fields);
  __pyx_v_self->__pyx___fields = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2621
 *             self.__fields = {<char*>fieldlist[i].getProto().getName().cStr() : _StructSchemaField()._init(fieldlist[i], self)
 *                                       for i in xrange(nfields)}
 *             return self.__fields             # <<<<<<<<<<<<<<
 * 
 *     property fields_list:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx___fields);
  __pyx_r = __pyx_v_self->__pyx___fields;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2614
 *     property fields:
 *         """All of the _StructSchemaField in this schema as a dict"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__fields is not None:
 *                return self.__fields
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.fields.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2625
 *     property fields_list:
 *         """All of the _StructSchemaField in this schema as a list"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__fields_list is not None:
 *                return self.__fields_list
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_11fields_list_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_11fields_list_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_11fields_list___get__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_11fields_list___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self) {
   ::capnp::StructSchema::FieldList __pyx_v_fieldlist;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_nfields;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_4;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_5;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2626
 *         """All of the _StructSchemaField in this schema as a list"""
 *         def __get__(self):
 *             if self.__fields_list is not None:             # <<<<<<<<<<<<<<
 *                return self.__fields_list
 *             fieldlist = self.thisptr.getFields()
 */
  __pyx_t_1 = (__pyx_v_self->__pyx___fields_list != ((PyObject*)Py_None));
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2627
 *         def __get__(self):
 *             if self.__fields_list is not None:
 *                return self.__fields_list             # <<<<<<<<<<<<<<
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx___fields_list);
    __pyx_r = __pyx_v_self->__pyx___fields_list;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2626
 *         """All of the _StructSchemaField in this schema as a list"""
 *         def __get__(self):
 *             if self.__fields_list is not None:             # <<<<<<<<<<<<<<
 *                return self.__fields_list
 *             fieldlist = self.thisptr.getFields()
 */
  }

  /* "capnp/lib/capnp.pyx":2628
 *             if self.__fields_list is not None:
 *                return self.__fields_list
 *             fieldlist = self.thisptr.getFields()             # <<<<<<<<<<<<<<
 *             nfields = fieldlist.size()
 *             self.__fields_list = [_StructSchemaField()._init(fieldlist[i], self)
 */
  __pyx_v_fieldlist = __pyx_v_self->thisptr.getFields();

  /* "capnp/lib/capnp.pyx":2629
 *                return self.__fields_list
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()             # <<<<<<<<<<<<<<
 *             self.__fields_list = [_StructSchemaField()._init(fieldlist[i], self)
 *                                       for i in xrange(nfields)]
 */
  __pyx_v_nfields = __pyx_v_fieldlist.size();

  /* "capnp/lib/capnp.pyx":2630
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 *             self.__fields_list = [_StructSchemaField()._init(fieldlist[i], self)             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields)]
 *             return self.__fields_list
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "capnp/lib/capnp.pyx":2631
 *             nfields = fieldlist.size()
 *             self.__fields_list = [_StructSchemaField()._init(fieldlist[i], self)
 *                                       for i in xrange(nfields)]             # <<<<<<<<<<<<<<
 *             return self.__fields_list
 * 
 */
  __pyx_t_4 = __pyx_v_nfields;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "capnp/lib/capnp.pyx":2630
 *             fieldlist = self.thisptr.getFields()
 *             nfields = fieldlist.size()
 *             self.__fields_list = [_StructSchemaField()._init(fieldlist[i], self)             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields)]
 *             return self.__fields_list
 */
    __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchemaField)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.parent = ((PyObject *)__pyx_v_self);
    __pyx_t_8 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchemaField *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_t_7)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_t_7), (__pyx_v_fieldlist[__pyx_v_i]), &__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2630, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 2630, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->__pyx___fields_list);
  __Pyx_DECREF(__pyx_v_self->__pyx___fields_list);
  __pyx_v_self->__pyx___fields_list = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2632
 *             self.__fields_list = [_StructSchemaField()._init(fieldlist[i], self)
 *                                       for i in xrange(nfields)]
 *             return self.__fields_list             # <<<<<<<<<<<<<<
 * 
 *     property node:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx___fields_list);
  __pyx_r = __pyx_v_self->__pyx___fields_list;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2625
 *     property fields_list:
 *         """All of the _StructSchemaField in this schema as a list"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__fields_list is not None:
 *                return self.__fields_list
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.fields_list.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2636
 *     property node:
 *         """The raw schema node"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_4node_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_4node_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_4node___get__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_4node___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
   ::capnp::schema::Node::Reader __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2637
 *         """The raw schema node"""
 *         def __get__(self):
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(_StructSchema self, _StructSchema other, mode):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_2 = __pyx_v_self->thisptr.getProto();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2637, __pyx_L1_error)
  }
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1), (( ::capnp::DynamicStruct::Reader)__pyx_t_2), ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2636
 *     property node:
 *         """The raw schema node"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2639
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 *     def __richcmp__(_StructSchema self, _StructSchema other, mode):             # <<<<<<<<<<<<<<
 *         if mode == 2:
 *             return self.thisptr == other.thisptr
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_mode); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_1__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_mode) {
  PyObject *__pyx_v_mode = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_v_mode = __Pyx_PyInt_From_int(__pyx_arg_mode); if (unlikely(!__pyx_v_mode)) __PYX_ERR(0, 2639, __pyx_L3_error)
  __Pyx_GOTREF(__pyx_v_mode);
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_5capnp_3lib_5capnp__StructSchema, 1, "other", 0))) __PYX_ERR(0, 2639, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema___richcmp__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self), ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_other), ((PyObject *)__pyx_v_mode));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema___richcmp__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self, struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_other, PyObject *__pyx_v_mode) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 0);

  /* "capnp/lib/capnp.pyx":2640
 * 
 *     def __richcmp__(_StructSchema self, _StructSchema other, mode):
 *         if mode == 2:             # <<<<<<<<<<<<<<
 *             return self.thisptr == other.thisptr
 *         elif mode == 3:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_mode, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2641
 *     def __richcmp__(_StructSchema self, _StructSchema other, mode):
 *         if mode == 2:
 *             return self.thisptr == other.thisptr             # <<<<<<<<<<<<<<
 *         elif mode == 3:
 *             return not (self.thisptr == other.thisptr)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->thisptr == __pyx_v_other->thisptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2640
 * 
 *     def __richcmp__(_StructSchema self, _StructSchema other, mode):
 *         if mode == 2:             # <<<<<<<<<<<<<<
 *             return self.thisptr == other.thisptr
 *         elif mode == 3:
 */
  }

  /* "capnp/lib/capnp.pyx":2642
 *         if mode == 2:
 *             return self.thisptr == other.thisptr
 *         elif mode == 3:             # <<<<<<<<<<<<<<
 *             return not (self.thisptr == other.thisptr)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_mode, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "capnp/lib/capnp.pyx":2643
 *             return self.thisptr == other.thisptr
 *         elif mode == 3:
 *             return not (self.thisptr == other.thisptr)             # <<<<<<<<<<<<<<
 *         else:
 *             raise NotImplementedError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBool_FromLong((!((__pyx_v_self->thisptr == __pyx_v_other->thisptr) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2642
 *         if mode == 2:
 *             return self.thisptr == other.thisptr
 *         elif mode == 3:             # <<<<<<<<<<<<<<
 *             return not (self.thisptr == other.thisptr)
 *         else:
 */
  }

  /* "capnp/lib/capnp.pyx":2645
 *             return not (self.thisptr == other.thisptr)
 *         else:
 *             raise NotImplementedError()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2645, __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_ERR(0, 2645, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":2639
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 *     def __richcmp__(_StructSchema self, _StructSchema other, mode):             # <<<<<<<<<<<<<<
 *         if mode == 2:
 *             return self.thisptr == other.thisptr
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2647
 *             raise NotImplementedError()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<schema for %s>' % self.node.displayName
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_2__repr__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_2__repr__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__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);

  /* "capnp/lib/capnp.pyx":2648
 * 
 *     def __repr__(self):
 *         return '<schema for %s>' % self.node.displayName             # <<<<<<<<<<<<<<
 * 
 * cdef typeAsSchema(capnp.SchemaType fieldType):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_displayName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_schema_for_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2648, __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;

  /* "capnp/lib/capnp.pyx":2647
 *             raise NotImplementedError()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<schema for %s>' % self.node.displayName
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructSchema_4__reduce_cython__[] = "_StructSchema.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructSchema_6__setstate_cython__[] = "_StructSchema.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructSchema_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructSchema_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchema.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2650
 *         return '<schema for %s>' % self.node.displayName
 * 
 * cdef typeAsSchema(capnp.SchemaType fieldType):             # <<<<<<<<<<<<<<
 *     # TODO(soon): make sure this is memory safe
 *     if fieldType.isInterface():
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_typeAsSchema( ::capnp::Type __pyx_v_fieldType) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
   ::capnp::InterfaceSchema __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::StructSchema __pyx_t_5;
   ::capnp::EnumSchema __pyx_t_6;
   ::capnp::ListSchema __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("typeAsSchema", 0);

  /* "capnp/lib/capnp.pyx":2652
 * cdef typeAsSchema(capnp.SchemaType fieldType):
 *     # TODO(soon): make sure this is memory safe
 *     if fieldType.isInterface():             # <<<<<<<<<<<<<<
 *         return _InterfaceSchema()._init(fieldType.asInterface())
 *     elif fieldType.isStruct():
 */
  __pyx_t_1 = (__pyx_v_fieldType.isInterface() != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":2653
 *     # TODO(soon): make sure this is memory safe
 *     if fieldType.isInterface():
 *         return _InterfaceSchema()._init(fieldType.asInterface())             # <<<<<<<<<<<<<<
 *     elif fieldType.isStruct():
 *         return _StructSchema()._init(fieldType.asStruct())
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    try {
      __pyx_t_3 = __pyx_v_fieldType.asInterface();
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 2653, __pyx_L1_error)
    }
    __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_2), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2652
 * cdef typeAsSchema(capnp.SchemaType fieldType):
 *     # TODO(soon): make sure this is memory safe
 *     if fieldType.isInterface():             # <<<<<<<<<<<<<<
 *         return _InterfaceSchema()._init(fieldType.asInterface())
 *     elif fieldType.isStruct():
 */
  }

  /* "capnp/lib/capnp.pyx":2654
 *     if fieldType.isInterface():
 *         return _InterfaceSchema()._init(fieldType.asInterface())
 *     elif fieldType.isStruct():             # <<<<<<<<<<<<<<
 *         return _StructSchema()._init(fieldType.asStruct())
 *     elif fieldType.isEnum():
 */
  __pyx_t_1 = (__pyx_v_fieldType.isStruct() != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":2655
 *         return _InterfaceSchema()._init(fieldType.asInterface())
 *     elif fieldType.isStruct():
 *         return _StructSchema()._init(fieldType.asStruct())             # <<<<<<<<<<<<<<
 *     elif fieldType.isEnum():
 *         return _EnumSchema()._init(fieldType.asEnum())
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchema)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    try {
      __pyx_t_5 = __pyx_v_fieldType.asStruct();
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 2655, __pyx_L1_error)
    }
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_4), __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2654
 *     if fieldType.isInterface():
 *         return _InterfaceSchema()._init(fieldType.asInterface())
 *     elif fieldType.isStruct():             # <<<<<<<<<<<<<<
 *         return _StructSchema()._init(fieldType.asStruct())
 *     elif fieldType.isEnum():
 */
  }

  /* "capnp/lib/capnp.pyx":2656
 *     elif fieldType.isStruct():
 *         return _StructSchema()._init(fieldType.asStruct())
 *     elif fieldType.isEnum():             # <<<<<<<<<<<<<<
 *         return _EnumSchema()._init(fieldType.asEnum())
 *     elif fieldType.isList():
 */
  __pyx_t_1 = (__pyx_v_fieldType.isEnum() != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":2657
 *         return _StructSchema()._init(fieldType.asStruct())
 *     elif fieldType.isEnum():
 *         return _EnumSchema()._init(fieldType.asEnum())             # <<<<<<<<<<<<<<
 *     elif fieldType.isList():
 *         return _ListSchema()._init(fieldType.asList())
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__EnumSchema)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    try {
      __pyx_t_6 = __pyx_v_fieldType.asEnum();
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 2657, __pyx_L1_error)
    }
    __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__EnumSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)__pyx_t_2), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2656
 *     elif fieldType.isStruct():
 *         return _StructSchema()._init(fieldType.asStruct())
 *     elif fieldType.isEnum():             # <<<<<<<<<<<<<<
 *         return _EnumSchema()._init(fieldType.asEnum())
 *     elif fieldType.isList():
 */
  }

  /* "capnp/lib/capnp.pyx":2658
 *     elif fieldType.isEnum():
 *         return _EnumSchema()._init(fieldType.asEnum())
 *     elif fieldType.isList():             # <<<<<<<<<<<<<<
 *         return _ListSchema()._init(fieldType.asList())
 *     else:
 */
  __pyx_t_1 = (__pyx_v_fieldType.isList() != 0);
  if (likely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":2659
 *         return _EnumSchema()._init(fieldType.asEnum())
 *     elif fieldType.isList():
 *         return _ListSchema()._init(fieldType.asList())             # <<<<<<<<<<<<<<
 *     else:
 *         raise KjException("Schema type is unknown")
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__ListSchema)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    try {
      __pyx_t_7 = __pyx_v_fieldType.asList();
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 2659, __pyx_L1_error)
    }
    __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__ListSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_t_4), __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2658
 *     elif fieldType.isEnum():
 *         return _EnumSchema()._init(fieldType.asEnum())
 *     elif fieldType.isList():             # <<<<<<<<<<<<<<
 *         return _ListSchema()._init(fieldType.asList())
 *     else:
 */
  }

  /* "capnp/lib/capnp.pyx":2661
 *         return _ListSchema()._init(fieldType.asList())
 *     else:
 *         raise KjException("Schema type is unknown")             # <<<<<<<<<<<<<<
 * 
 * cdef class _StructSchemaField:
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_KjException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_kp_s_Schema_type_is_unknown) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Schema_type_is_unknown);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2661, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":2650
 *         return '<schema for %s>' % self.node.displayName
 * 
 * cdef typeAsSchema(capnp.SchemaType fieldType):             # <<<<<<<<<<<<<<
 *     # TODO(soon): make sure this is memory safe
 *     if fieldType.isInterface():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("capnp.lib.capnp.typeAsSchema", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2664
 * 
 * cdef class _StructSchemaField:
 *     cdef _init(self, C_StructSchema.Field other, parent=None):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_18_StructSchemaField__init(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_self,  ::capnp::StructSchema::Field __pyx_v_other, struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init *__pyx_optional_args) {
  PyObject *__pyx_v_parent = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_parent = __pyx_optional_args->parent;
    }
  }

  /* "capnp/lib/capnp.pyx":2665
 * cdef class _StructSchemaField:
 *     cdef _init(self, C_StructSchema.Field other, parent=None):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         self._parent = parent
 *         return self
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2666
 *     cdef _init(self, C_StructSchema.Field other, parent=None):
 *         self.thisptr = other
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":2667
 *         self.thisptr = other
 *         self._parent = parent
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property proto:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2664
 * 
 * cdef class _StructSchemaField:
 *     cdef _init(self, C_StructSchema.Field other, parent=None):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         self._parent = parent
 */

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

/* "capnp/lib/capnp.pyx":2671
 *     property proto:
 *         """The raw schema proto"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_5proto_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_5proto_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_5proto___get__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_5proto___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__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("__get__", 0);

  /* "capnp/lib/capnp.pyx":2672
 *         """The raw schema proto"""
 *         def __get__(self):
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)             # <<<<<<<<<<<<<<
 * 
 *     property schema:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1), (( ::capnp::DynamicStruct::Reader)__pyx_v_self->thisptr.getProto()), ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2672, __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;

  /* "capnp/lib/capnp.pyx":2671
 *     property proto:
 *         """The raw schema proto"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchemaField.proto.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2676
 *     property schema:
 *         """The schema of this field, or None if it's a type without a schema"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return typeAsSchema(self.thisptr.getType())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2677
 *         """The schema of this field, or None if it's a type without a schema"""
 *         def __get__(self):
 *             return typeAsSchema(self.thisptr.getType())             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_typeAsSchema(__pyx_v_self->thisptr.getType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2676
 *     property schema:
 *         """The schema of this field, or None if it's a type without a schema"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return typeAsSchema(self.thisptr.getType())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchemaField.schema.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2679
 *             return typeAsSchema(self.thisptr.getType())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<field schema for %s>' % self.proto.name
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_1__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField___repr__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField___repr__(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__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);

  /* "capnp/lib/capnp.pyx":2680
 * 
 *     def __repr__(self):
 *         return '<field schema for %s>' % self.proto.name             # <<<<<<<<<<<<<<
 * 
 * cdef class _InterfaceMethod:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_proto); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_field_schema_for_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2680, __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;

  /* "capnp/lib/capnp.pyx":2679
 *             return typeAsSchema(self.thisptr.getType())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<field schema for %s>' % self.proto.name
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_18_StructSchemaField_2__reduce_cython__[] = "_StructSchemaField.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchemaField.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_18_StructSchemaField_4__setstate_cython__[] = "_StructSchemaField.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_18_StructSchemaField_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StructSchemaField.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2685
 *     cdef C_InterfaceSchema.Method thisptr
 * 
 *     cdef _init(self, C_InterfaceSchema.Method other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_16_InterfaceMethod__init(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__pyx_v_self,  ::capnp::InterfaceSchema::Method __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":2686
 * 
 *     cdef _init(self, C_InterfaceSchema.Method other):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2687
 *     cdef _init(self, C_InterfaceSchema.Method other):
 *         self.thisptr = other
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property param_type:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2685
 *     cdef C_InterfaceSchema.Method thisptr
 * 
 *     cdef _init(self, C_InterfaceSchema.Method other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":2691
 *     property param_type:
 *         """The type of this method's parameter struct"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             # TODO(soon): make sure this is memory safe
 *             return _StructSchema()._init(self.thisptr.getParamType())
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_10param_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_10param_type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod_10param_type___get__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod_10param_type___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__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("__get__", 0);

  /* "capnp/lib/capnp.pyx":2693
 *         def __get__(self):
 *             # TODO(soon): make sure this is memory safe
 *             return _StructSchema()._init(self.thisptr.getParamType())             # <<<<<<<<<<<<<<
 * 
 *     property result_type:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1), __pyx_v_self->thisptr.getParamType()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2693, __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;

  /* "capnp/lib/capnp.pyx":2691
 *     property param_type:
 *         """The type of this method's parameter struct"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             # TODO(soon): make sure this is memory safe
 *             return _StructSchema()._init(self.thisptr.getParamType())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceMethod.param_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2697
 *     property result_type:
 *         """The type of this method's result struct"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             # TODO(soon): make sure this is memory safe
 *             return _StructSchema()._init(self.thisptr.getResultType())
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_11result_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_11result_type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod_11result_type___get__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod_11result_type___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__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("__get__", 0);

  /* "capnp/lib/capnp.pyx":2699
 *         def __get__(self):
 *             # TODO(soon): make sure this is memory safe
 *             return _StructSchema()._init(self.thisptr.getResultType())             # <<<<<<<<<<<<<<
 * 
 * cdef class _InterfaceSchema:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StructSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1), __pyx_v_self->thisptr.getResultType()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2699, __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;

  /* "capnp/lib/capnp.pyx":2697
 *     property result_type:
 *         """The type of this method's result struct"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             # TODO(soon): make sure this is memory safe
 *             return _StructSchema()._init(self.thisptr.getResultType())
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceMethod.result_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16_InterfaceMethod___reduce_cython__[] = "_InterfaceMethod.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod___reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceMethod.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16_InterfaceMethod_2__setstate_cython__[] = "_InterfaceMethod.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod_2__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceMethod_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceMethod.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2702
 * 
 * cdef class _InterfaceSchema:
 *     cdef _init(self, C_InterfaceSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_16_InterfaceSchema__init(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self,  ::capnp::InterfaceSchema __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":2703
 * cdef class _InterfaceSchema:
 *     cdef _init(self, C_InterfaceSchema other):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2704
 *     cdef _init(self, C_InterfaceSchema other):
 *         self.thisptr = other
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property method_names:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2702
 * 
 * cdef class _InterfaceSchema:
 *     cdef _init(self, C_InterfaceSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":2708
 *     property method_names:
 *         """A tuple of the function names in the interface."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__method_names is not None:
 *                return self.__method_names
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names___get__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names_7__get___2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":2713
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()
 *             self.__method_names = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__method_names
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names_7__get___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2713, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names_7__get___2generator9, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_InterfaceSchema___get___locals, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 2713, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.method_names.__get__.genexpr", __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_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names_7__get___2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 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_ERR(0, 2713, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2714
 *             nfields = fieldlist.size()
 *             self.__method_names = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))             # <<<<<<<<<<<<<<
 *             return self.__method_names
 * 
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_nfields;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "capnp/lib/capnp.pyx":2713
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()
 *             self.__method_names = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__method_names
 */
    __pyx_t_4 = __Pyx_PyStr_FromString(((char *)(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fieldlist[__pyx_cur_scope->__pyx_v_i]).getProto().getName().cStr())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2713, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2713, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2708
 *     property method_names:
 *         """A tuple of the function names in the interface."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__method_names is not None:
 *                return self.__method_names
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *__pyx_cur_scope;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_13___get__(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_13___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2708, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "capnp/lib/capnp.pyx":2709
 *         """A tuple of the function names in the interface."""
 *         def __get__(self):
 *             if self.__method_names is not None:             # <<<<<<<<<<<<<<
 *                return self.__method_names
 *             fieldlist = self.thisptr.getMethods()
 */
  __pyx_t_1 = (__pyx_v_self->__pyx___method_names != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2710
 *         def __get__(self):
 *             if self.__method_names is not None:
 *                return self.__method_names             # <<<<<<<<<<<<<<
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx___method_names);
    __pyx_r = __pyx_v_self->__pyx___method_names;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2709
 *         """A tuple of the function names in the interface."""
 *         def __get__(self):
 *             if self.__method_names is not None:             # <<<<<<<<<<<<<<
 *                return self.__method_names
 *             fieldlist = self.thisptr.getMethods()
 */
  }

  /* "capnp/lib/capnp.pyx":2711
 *             if self.__method_names is not None:
 *                return self.__method_names
 *             fieldlist = self.thisptr.getMethods()             # <<<<<<<<<<<<<<
 *             nfields = fieldlist.size()
 *             self.__method_names = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 */
  __pyx_cur_scope->__pyx_v_fieldlist = __pyx_v_self->thisptr.getMethods();

  /* "capnp/lib/capnp.pyx":2712
 *                return self.__method_names
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()             # <<<<<<<<<<<<<<
 *             self.__method_names = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 */
  __pyx_cur_scope->__pyx_v_nfields = __pyx_cur_scope->__pyx_v_fieldlist.size();

  /* "capnp/lib/capnp.pyx":2713
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()
 *             self.__method_names = tuple(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             return self.__method_names
 */
  __pyx_t_3 = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names_7__get___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->__pyx___method_names);
  __Pyx_DECREF(__pyx_v_self->__pyx___method_names);
  __pyx_v_self->__pyx___method_names = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2715
 *             self.__method_names = tuple(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 *             return self.__method_names             # <<<<<<<<<<<<<<
 * 
 *     property method_names_inherited:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx___method_names);
  __pyx_r = __pyx_v_self->__pyx___method_names;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2708
 *     property method_names:
 *         """A tuple of the function names in the interface."""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__method_names is not None:
 *                return self.__method_names
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.method_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2719
 *     property method_names_inherited:
 *         """A set of the function names in the interface, including inherited methods"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__method_names_inherited is not None:
 *                return self.__method_names_inherited
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited___get__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited_7__get___2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "capnp/lib/capnp.pyx":2725
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()
 *             self.__method_names_inherited = set(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             for interface in self.superclasses:
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited_7__get___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2725, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited_7__get___2generator10, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_InterfaceSchema___get___locals, __pyx_n_s_capnp_lib_capnp); if (unlikely(!gen)) __PYX_ERR(0, 2725, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.method_names_inherited.__get__.genexpr", __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_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited_7__get___2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_1;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2725, __pyx_L1_error)
  __pyx_r = PySet_New(NULL); if (unlikely(!__pyx_r)) __PYX_ERR(0, 2725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_r);

  /* "capnp/lib/capnp.pyx":2726
 *             nfields = fieldlist.size()
 *             self.__method_names_inherited = set(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))             # <<<<<<<<<<<<<<
 *             for interface in self.superclasses:
 *                 self.__method_names_inherited |= interface.method_names_inherited
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_nfields;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "capnp/lib/capnp.pyx":2725
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()
 *             self.__method_names_inherited = set(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             for interface in self.superclasses:
 */
    __pyx_t_4 = __Pyx_PyStr_FromString(((char *)(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fieldlist[__pyx_cur_scope->__pyx_v_i]).getProto().getName().cStr())); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(PySet_Add(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 2725, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2719
 *     property method_names_inherited:
 *         """A set of the function names in the interface, including inherited methods"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__method_names_inherited is not None:
 *                return self.__method_names_inherited
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *__pyx_cur_scope;
  PyObject *__pyx_v_interface = 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;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_15___get__(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_15___get__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2719, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }

  /* "capnp/lib/capnp.pyx":2720
 *         """A set of the function names in the interface, including inherited methods"""
 *         def __get__(self):
 *             if self.__method_names_inherited is not None:             # <<<<<<<<<<<<<<
 *                return self.__method_names_inherited
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx___method_names_inherited != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2721
 *         def __get__(self):
 *             if self.__method_names_inherited is not None:
 *                return self.__method_names_inherited             # <<<<<<<<<<<<<<
 * 
 *             fieldlist = self.thisptr.getMethods()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx___method_names_inherited);
    __pyx_r = __pyx_v_self->__pyx___method_names_inherited;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2720
 *         """A set of the function names in the interface, including inherited methods"""
 *         def __get__(self):
 *             if self.__method_names_inherited is not None:             # <<<<<<<<<<<<<<
 *                return self.__method_names_inherited
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":2723
 *                return self.__method_names_inherited
 * 
 *             fieldlist = self.thisptr.getMethods()             # <<<<<<<<<<<<<<
 *             nfields = fieldlist.size()
 *             self.__method_names_inherited = set(<char*>fieldlist[i].getProto().getName().cStr()
 */
  __pyx_cur_scope->__pyx_v_fieldlist = __pyx_v_self->thisptr.getMethods();

  /* "capnp/lib/capnp.pyx":2724
 * 
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()             # <<<<<<<<<<<<<<
 *             self.__method_names_inherited = set(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 */
  __pyx_cur_scope->__pyx_v_nfields = __pyx_cur_scope->__pyx_v_fieldlist.size();

  /* "capnp/lib/capnp.pyx":2725
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()
 *             self.__method_names_inherited = set(<char*>fieldlist[i].getProto().getName().cStr()             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields))
 *             for interface in self.superclasses:
 */
  __pyx_t_3 = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited_7__get___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->__pyx___method_names_inherited);
  __Pyx_DECREF(__pyx_v_self->__pyx___method_names_inherited);
  __pyx_v_self->__pyx___method_names_inherited = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":2727
 *             self.__method_names_inherited = set(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 *             for interface in self.superclasses:             # <<<<<<<<<<<<<<
 *                 self.__method_names_inherited |= interface.method_names_inherited
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_superclasses); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2727, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2727, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2727, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2727, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_interface, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "capnp/lib/capnp.pyx":2728
 *                                       for i in xrange(nfields))
 *             for interface in self.superclasses:
 *                 self.__method_names_inherited |= interface.method_names_inherited             # <<<<<<<<<<<<<<
 * 
 *             return self.__method_names_inherited
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_interface, __pyx_n_s_method_names_inherited); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyNumber_InPlaceOr(__pyx_v_self->__pyx___method_names_inherited, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_7);
    __Pyx_GOTREF(__pyx_v_self->__pyx___method_names_inherited);
    __Pyx_DECREF(__pyx_v_self->__pyx___method_names_inherited);
    __pyx_v_self->__pyx___method_names_inherited = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "capnp/lib/capnp.pyx":2727
 *             self.__method_names_inherited = set(<char*>fieldlist[i].getProto().getName().cStr()
 *                                       for i in xrange(nfields))
 *             for interface in self.superclasses:             # <<<<<<<<<<<<<<
 *                 self.__method_names_inherited |= interface.method_names_inherited
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2730
 *                 self.__method_names_inherited |= interface.method_names_inherited
 * 
 *             return self.__method_names_inherited             # <<<<<<<<<<<<<<
 * 
 *     property methods:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx___method_names_inherited);
  __pyx_r = __pyx_v_self->__pyx___method_names_inherited;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2719
 *     property method_names_inherited:
 *         """A set of the function names in the interface, including inherited methods"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__method_names_inherited is not None:
 *                return self.__method_names_inherited
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.method_names_inherited.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_interface);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2734
 *     property methods:
 *         """A mapping of method names to their respective _InterfaceMethod"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__methods is not None:
 *                return self.__methods
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_7methods_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_7methods_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_7methods___get__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_7methods___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self) {
   ::capnp::InterfaceSchema::MethodList __pyx_v_fieldlist;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_nfields;
  __pyx_t_5capnp_8includes_5types_uint __pyx_8genexpr9__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_4;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_5;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  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("__get__", 0);

  /* "capnp/lib/capnp.pyx":2735
 *         """A mapping of method names to their respective _InterfaceMethod"""
 *         def __get__(self):
 *             if self.__methods is not None:             # <<<<<<<<<<<<<<
 *                return self.__methods
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx___methods != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2736
 *         def __get__(self):
 *             if self.__methods is not None:
 *                return self.__methods             # <<<<<<<<<<<<<<
 * 
 *             fieldlist = self.thisptr.getMethods()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx___methods);
    __pyx_r = __pyx_v_self->__pyx___methods;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2735
 *         """A mapping of method names to their respective _InterfaceMethod"""
 *         def __get__(self):
 *             if self.__methods is not None:             # <<<<<<<<<<<<<<
 *                return self.__methods
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":2738
 *                return self.__methods
 * 
 *             fieldlist = self.thisptr.getMethods()             # <<<<<<<<<<<<<<
 *             nfields = fieldlist.size()
 *             # TODO(soon): make sure this is memory safe
 */
  __pyx_v_fieldlist = __pyx_v_self->thisptr.getMethods();

  /* "capnp/lib/capnp.pyx":2739
 * 
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()             # <<<<<<<<<<<<<<
 *             # TODO(soon): make sure this is memory safe
 *             self.__methods = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])
 */
  __pyx_v_nfields = __pyx_v_fieldlist.size();

  /* "capnp/lib/capnp.pyx":2741
 *             nfields = fieldlist.size()
 *             # TODO(soon): make sure this is memory safe
 *             self.__methods = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields)}
 *             return self.__methods
 */
  { /* enter inner scope */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "capnp/lib/capnp.pyx":2742
 *             # TODO(soon): make sure this is memory safe
 *             self.__methods = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])
 *                                       for i in xrange(nfields)}             # <<<<<<<<<<<<<<
 *             return self.__methods
 * 
 */
    __pyx_t_4 = __pyx_v_nfields;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_8genexpr9__pyx_v_i = __pyx_t_6;

      /* "capnp/lib/capnp.pyx":2741
 *             nfields = fieldlist.size()
 *             # TODO(soon): make sure this is memory safe
 *             self.__methods = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields)}
 *             return self.__methods
 */
      __pyx_t_7 = __Pyx_PyStr_FromString((__pyx_v_fieldlist[__pyx_8genexpr9__pyx_v_i]).getProto().getName().cStr()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__InterfaceMethod)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceMethod *)((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *)__pyx_t_8)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *)__pyx_t_8), (__pyx_v_fieldlist[__pyx_8genexpr9__pyx_v_i])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2741, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_t_7, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 2741, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->__pyx___methods);
  __Pyx_DECREF(__pyx_v_self->__pyx___methods);
  __pyx_v_self->__pyx___methods = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2743
 *             self.__methods = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])
 *                                       for i in xrange(nfields)}
 *             return self.__methods             # <<<<<<<<<<<<<<
 * 
 *     property methods_inherited:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx___methods);
  __pyx_r = __pyx_v_self->__pyx___methods;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2734
 *     property methods:
 *         """A mapping of method names to their respective _InterfaceMethod"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__methods is not None:
 *                return self.__methods
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.methods.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2747
 *     property methods_inherited:
 *         """A mapping of method names to their respective _InterfaceMethod, including inherited methods"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__methods_inherited is not None:
 *                return self.__methods_inherited
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_17methods_inherited_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_17methods_inherited_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_17methods_inherited___get__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_17methods_inherited___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self) {
   ::capnp::InterfaceSchema::MethodList __pyx_v_fieldlist;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_nfields;
  PyObject *__pyx_v_interface = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_9genexpr10__pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_4;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_5;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2748
 *         """A mapping of method names to their respective _InterfaceMethod, including inherited methods"""
 *         def __get__(self):
 *             if self.__methods_inherited is not None:             # <<<<<<<<<<<<<<
 *                return self.__methods_inherited
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx___methods_inherited != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2749
 *         def __get__(self):
 *             if self.__methods_inherited is not None:
 *                return self.__methods_inherited             # <<<<<<<<<<<<<<
 * 
 *             fieldlist = self.thisptr.getMethods()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->__pyx___methods_inherited);
    __pyx_r = __pyx_v_self->__pyx___methods_inherited;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":2748
 *         """A mapping of method names to their respective _InterfaceMethod, including inherited methods"""
 *         def __get__(self):
 *             if self.__methods_inherited is not None:             # <<<<<<<<<<<<<<
 *                return self.__methods_inherited
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":2751
 *                return self.__methods_inherited
 * 
 *             fieldlist = self.thisptr.getMethods()             # <<<<<<<<<<<<<<
 *             nfields = fieldlist.size()
 *             # TODO(soon): make sure this is memory safe
 */
  __pyx_v_fieldlist = __pyx_v_self->thisptr.getMethods();

  /* "capnp/lib/capnp.pyx":2752
 * 
 *             fieldlist = self.thisptr.getMethods()
 *             nfields = fieldlist.size()             # <<<<<<<<<<<<<<
 *             # TODO(soon): make sure this is memory safe
 *             self.__methods_inherited = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])
 */
  __pyx_v_nfields = __pyx_v_fieldlist.size();

  /* "capnp/lib/capnp.pyx":2754
 *             nfields = fieldlist.size()
 *             # TODO(soon): make sure this is memory safe
 *             self.__methods_inherited = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields)}
 *             for interface in self.superclasses:
 */
  { /* enter inner scope */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2754, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "capnp/lib/capnp.pyx":2755
 *             # TODO(soon): make sure this is memory safe
 *             self.__methods_inherited = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])
 *                                       for i in xrange(nfields)}             # <<<<<<<<<<<<<<
 *             for interface in self.superclasses:
 *                 self.__methods_inherited.update(interface.methods_inherited)
 */
    __pyx_t_4 = __pyx_v_nfields;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_9genexpr10__pyx_v_i = __pyx_t_6;

      /* "capnp/lib/capnp.pyx":2754
 *             nfields = fieldlist.size()
 *             # TODO(soon): make sure this is memory safe
 *             self.__methods_inherited = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])             # <<<<<<<<<<<<<<
 *                                       for i in xrange(nfields)}
 *             for interface in self.superclasses:
 */
      __pyx_t_7 = __Pyx_PyStr_FromString((__pyx_v_fieldlist[__pyx_9genexpr10__pyx_v_i]).getProto().getName().cStr()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__InterfaceMethod)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceMethod *)((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *)__pyx_t_8)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *)__pyx_t_8), (__pyx_v_fieldlist[__pyx_9genexpr10__pyx_v_i])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_t_7, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 2754, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->__pyx___methods_inherited);
  __Pyx_DECREF(__pyx_v_self->__pyx___methods_inherited);
  __pyx_v_self->__pyx___methods_inherited = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2756
 *             self.__methods_inherited = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])
 *                                       for i in xrange(nfields)}
 *             for interface in self.superclasses:             # <<<<<<<<<<<<<<
 *                 self.__methods_inherited.update(interface.methods_inherited)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_superclasses); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_9 = __pyx_t_3; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2756, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      if (likely(PyList_CheckExact(__pyx_t_9))) {
        if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_9)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2756, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2756, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2756, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2756, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_11(__pyx_t_9);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2756, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_interface, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":2757
 *                                       for i in xrange(nfields)}
 *             for interface in self.superclasses:
 *                 self.__methods_inherited.update(interface.methods_inherited)             # <<<<<<<<<<<<<<
 * 
 *             return self.__methods_inherited
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx___methods_inherited, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_interface, __pyx_n_s_methods_inherited); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_12 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_3 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_12, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":2756
 *             self.__methods_inherited = {fieldlist[i].getProto().getName().cStr() : _InterfaceMethod()._init(fieldlist[i])
 *                                       for i in xrange(nfields)}
 *             for interface in self.superclasses:             # <<<<<<<<<<<<<<
 *                 self.__methods_inherited.update(interface.methods_inherited)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "capnp/lib/capnp.pyx":2759
 *                 self.__methods_inherited.update(interface.methods_inherited)
 * 
 *             return self.__methods_inherited             # <<<<<<<<<<<<<<
 * 
 *     property superclasses:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__pyx___methods_inherited);
  __pyx_r = __pyx_v_self->__pyx___methods_inherited;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2747
 *     property methods_inherited:
 *         """A mapping of method names to their respective _InterfaceMethod, including inherited methods"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             if self.__methods_inherited is not None:
 *                return self.__methods_inherited
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.methods_inherited.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_interface);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2763
 *     property superclasses:
 *         """A list of superclasses for this interface"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef C_InterfaceSchema.SuperclassList classes = self.thisptr.getSuperclasses()
 *             return [_InterfaceSchema()._init(classes[i]) for i in range(classes.size())]
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_12superclasses_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_12superclasses_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_12superclasses___get__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_12superclasses___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self) {
   ::capnp::InterfaceSchema::SuperclassList __pyx_v_classes;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_3;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2764
 *         """A list of superclasses for this interface"""
 *         def __get__(self):
 *             cdef C_InterfaceSchema.SuperclassList classes = self.thisptr.getSuperclasses()             # <<<<<<<<<<<<<<
 *             return [_InterfaceSchema()._init(classes[i]) for i in range(classes.size())]
 * 
 */
  __pyx_v_classes = __pyx_v_self->thisptr.getSuperclasses();

  /* "capnp/lib/capnp.pyx":2765
 *         def __get__(self):
 *             cdef C_InterfaceSchema.SuperclassList classes = self.thisptr.getSuperclasses()
 *             return [_InterfaceSchema()._init(classes[i]) for i in range(classes.size())]             # <<<<<<<<<<<<<<
 * 
 *     property node:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_classes.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_5)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_5), (__pyx_v_classes[__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2765, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2763
 *     property superclasses:
 *         """A list of superclasses for this interface"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef C_InterfaceSchema.SuperclassList classes = self.thisptr.getSuperclasses()
 *             return [_InterfaceSchema()._init(classes[i]) for i in range(classes.size())]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.superclasses.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2769
 *     property node:
 *         """The raw schema node"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_4node_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_4node_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_4node___get__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_4node___get__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
   ::capnp::schema::Node::Reader __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2770
 *         """The raw schema node"""
 *         def __get__(self):
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_2 = __pyx_v_self->thisptr.getProto();
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2770, __pyx_L1_error)
  }
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1), (( ::capnp::DynamicStruct::Reader)__pyx_t_2), ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2769
 *     property node:
 *         """The raw schema node"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2772
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<schema for %s>' % self.node.displayName
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_1__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema___repr__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema___repr__(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__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);

  /* "capnp/lib/capnp.pyx":2773
 * 
 *     def __repr__(self):
 *         return '<schema for %s>' % self.node.displayName             # <<<<<<<<<<<<<<
 * 
 * cdef class _EnumSchema:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_displayName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_schema_for_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2773, __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;

  /* "capnp/lib/capnp.pyx":2772
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<schema for %s>' % self.node.displayName
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16_InterfaceSchema_2__reduce_cython__[] = "_InterfaceSchema.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16_InterfaceSchema_4__setstate_cython__[] = "_InterfaceSchema.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceSchema_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceSchema.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2778
 *     cdef C_EnumSchema thisptr
 * 
 *     cdef _init(self, C_EnumSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_11_EnumSchema__init(struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__pyx_v_self,  ::capnp::EnumSchema __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":2779
 * 
 *     cdef _init(self, C_EnumSchema other):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2780
 *     cdef _init(self, C_EnumSchema other):
 *         self.thisptr = other
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property enumerants:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2778
 *     cdef C_EnumSchema thisptr
 * 
 *     cdef _init(self, C_EnumSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":2784
 *     property enumerants:
 *         """The list of enumerants as a dictionary"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             ret = {}
 *             enumerants = self.thisptr.getEnumerants()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_10enumerants_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_10enumerants_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_EnumSchema_10enumerants___get__(((struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumSchema_10enumerants___get__(struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__pyx_v_self) {
  PyObject *__pyx_v_ret = NULL;
   ::capnp::EnumSchema::EnumerantList __pyx_v_enumerants;
  __pyx_t_5capnp_8includes_5types_uint __pyx_v_i;
   ::capnp::EnumSchema::Enumerant __pyx_v_enumerant;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_3;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2785
 *         """The list of enumerants as a dictionary"""
 *         def __get__(self):
 *             ret = {}             # <<<<<<<<<<<<<<
 *             enumerants = self.thisptr.getEnumerants()
 *             for i in range(enumerants.size()):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ret = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2786
 *         def __get__(self):
 *             ret = {}
 *             enumerants = self.thisptr.getEnumerants()             # <<<<<<<<<<<<<<
 *             for i in range(enumerants.size()):
 *                 enumerant = enumerants[i]
 */
  __pyx_v_enumerants = __pyx_v_self->thisptr.getEnumerants();

  /* "capnp/lib/capnp.pyx":2787
 *             ret = {}
 *             enumerants = self.thisptr.getEnumerants()
 *             for i in range(enumerants.size()):             # <<<<<<<<<<<<<<
 *                 enumerant = enumerants[i]
 *                 ret[<char *>enumerant.getProto().getName().cStr()] = enumerant.getOrdinal()
 */
  __pyx_t_2 = __pyx_v_enumerants.size();
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "capnp/lib/capnp.pyx":2788
 *             enumerants = self.thisptr.getEnumerants()
 *             for i in range(enumerants.size()):
 *                 enumerant = enumerants[i]             # <<<<<<<<<<<<<<
 *                 ret[<char *>enumerant.getProto().getName().cStr()] = enumerant.getOrdinal()
 * 
 */
    __pyx_v_enumerant = (__pyx_v_enumerants[__pyx_v_i]);

    /* "capnp/lib/capnp.pyx":2789
 *             for i in range(enumerants.size()):
 *                 enumerant = enumerants[i]
 *                 ret[<char *>enumerant.getProto().getName().cStr()] = enumerant.getOrdinal()             # <<<<<<<<<<<<<<
 * 
 *             return ret
 */
    __pyx_t_1 = __Pyx_PyInt_From_uint16_t(__pyx_v_enumerant.getOrdinal()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyStr_FromString(((char *)__pyx_v_enumerant.getProto().getName().cStr())); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyDict_SetItem(__pyx_v_ret, __pyx_t_5, __pyx_t_1) < 0)) __PYX_ERR(0, 2789, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "capnp/lib/capnp.pyx":2791
 *                 ret[<char *>enumerant.getProto().getName().cStr()] = enumerant.getOrdinal()
 * 
 *             return ret             # <<<<<<<<<<<<<<
 * 
 *     property node:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2784
 *     property enumerants:
 *         """The list of enumerants as a dictionary"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             ret = {}
 *             enumerants = self.thisptr.getEnumerants()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._EnumSchema.enumerants.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2795
 *     property node:
 *         """The raw schema node"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_4node_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_4node_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_EnumSchema_4node___get__(((struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumSchema_4node___get__(struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__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("__get__", 0);

  /* "capnp/lib/capnp.pyx":2796
 *         """The raw schema node"""
 *         def __get__(self):
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)             # <<<<<<<<<<<<<<
 * 
 * cdef class _SchemaType:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1), (( ::capnp::DynamicStruct::Reader)__pyx_v_self->thisptr.getProto()), ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2796, __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;

  /* "capnp/lib/capnp.pyx":2795
 *     property node:
 *         """The raw schema node"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return _DynamicStructReader()._init(self.thisptr.getProto(), self)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._EnumSchema.node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_EnumSchema___reduce_cython__[] = "_EnumSchema.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_EnumSchema___reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumSchema___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._EnumSchema.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_EnumSchema_2__setstate_cython__[] = "_EnumSchema.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_EnumSchema_2__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumSchema_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._EnumSchema.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_SchemaType_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_SchemaType___reduce_cython__[] = "_SchemaType.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_SchemaType_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_SchemaType___reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_SchemaType___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._SchemaType.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_SchemaType_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_SchemaType_2__setstate_cython__[] = "_SchemaType.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_SchemaType_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_SchemaType_2__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_SchemaType_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._SchemaType.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2881
 *     cdef C_ListSchema thisptr
 * 
 *     def __init__(self, schema=None):             # <<<<<<<<<<<<<<
 *         cdef _StructSchema ss
 *         cdef _EnumSchema es
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_11_ListSchema_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_11_ListSchema_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_schema = 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_schema,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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema);
          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_ERR(0, 2881, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_schema = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2881, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._ListSchema.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_ListSchema___init__(((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_v_self), __pyx_v_schema);

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

static int __pyx_pf_5capnp_3lib_5capnp_11_ListSchema___init__(struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_self, PyObject *__pyx_v_schema) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_ss = 0;
  struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *__pyx_v_es = 0;
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *__pyx_v_iis = 0;
  struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_ls = 0;
  struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *__pyx_v_st = 0;
  PyObject *__pyx_v_s = NULL;
  PyTypeObject *__pyx_v_typeSchema = 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("__init__", 0);

  /* "capnp/lib/capnp.pyx":2888
 *         cdef _SchemaType st
 * 
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             if hasattr(schema, 'schema'):
 *                 s = schema.schema
 */
  __pyx_t_1 = (__pyx_v_schema != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":2889
 * 
 *         if schema is not None:
 *             if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *                 s = schema.schema
 *             else:
 */
    __pyx_t_2 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2889, __pyx_L1_error)
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "capnp/lib/capnp.pyx":2890
 *         if schema is not None:
 *             if hasattr(schema, 'schema'):
 *                 s = schema.schema             # <<<<<<<<<<<<<<
 *             else:
 *                 s = schema
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2890, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_s = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":2889
 * 
 *         if schema is not None:
 *             if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *                 s = schema.schema
 *             else:
 */
      goto __pyx_L4;
    }

    /* "capnp/lib/capnp.pyx":2892
 *                 s = schema.schema
 *             else:
 *                 s = schema             # <<<<<<<<<<<<<<
 * 
 *             typeSchema = type(s)
 */
    /*else*/ {
      __Pyx_INCREF(__pyx_v_schema);
      __pyx_v_s = __pyx_v_schema;
    }
    __pyx_L4:;

    /* "capnp/lib/capnp.pyx":2894
 *                 s = schema
 * 
 *             typeSchema = type(s)             # <<<<<<<<<<<<<<
 *             if typeSchema is _StructSchema:
 *                 ss = s
 */
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_s)));
    __pyx_v_typeSchema = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_s)));

    /* "capnp/lib/capnp.pyx":2895
 * 
 *             typeSchema = type(s)
 *             if typeSchema is _StructSchema:             # <<<<<<<<<<<<<<
 *                 ss = s
 *                 self.thisptr = capnp.listSchemaOfStruct(ss.thisptr)
 */
    __pyx_t_1 = (__pyx_v_typeSchema == __pyx_ptype_5capnp_3lib_5capnp__StructSchema);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "capnp/lib/capnp.pyx":2896
 *             typeSchema = type(s)
 *             if typeSchema is _StructSchema:
 *                 ss = s             # <<<<<<<<<<<<<<
 *                 self.thisptr = capnp.listSchemaOfStruct(ss.thisptr)
 *             elif typeSchema is _EnumSchema:
 */
      if (!(likely(((__pyx_v_s) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_s, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 2896, __pyx_L1_error)
      __pyx_t_3 = __pyx_v_s;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_ss = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":2897
 *             if typeSchema is _StructSchema:
 *                 ss = s
 *                 self.thisptr = capnp.listSchemaOfStruct(ss.thisptr)             # <<<<<<<<<<<<<<
 *             elif typeSchema is _EnumSchema:
 *                 es = s
 */
      __pyx_v_self->thisptr =  ::capnp::ListSchema::of(__pyx_v_ss->thisptr);

      /* "capnp/lib/capnp.pyx":2895
 * 
 *             typeSchema = type(s)
 *             if typeSchema is _StructSchema:             # <<<<<<<<<<<<<<
 *                 ss = s
 *                 self.thisptr = capnp.listSchemaOfStruct(ss.thisptr)
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":2898
 *                 ss = s
 *                 self.thisptr = capnp.listSchemaOfStruct(ss.thisptr)
 *             elif typeSchema is _EnumSchema:             # <<<<<<<<<<<<<<
 *                 es = s
 *                 self.thisptr = capnp.listSchemaOfEnum(es.thisptr)
 */
    __pyx_t_2 = (__pyx_v_typeSchema == __pyx_ptype_5capnp_3lib_5capnp__EnumSchema);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "capnp/lib/capnp.pyx":2899
 *                 self.thisptr = capnp.listSchemaOfStruct(ss.thisptr)
 *             elif typeSchema is _EnumSchema:
 *                 es = s             # <<<<<<<<<<<<<<
 *                 self.thisptr = capnp.listSchemaOfEnum(es.thisptr)
 *             elif typeSchema is _InterfaceSchema:
 */
      if (!(likely(((__pyx_v_s) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_s, __pyx_ptype_5capnp_3lib_5capnp__EnumSchema))))) __PYX_ERR(0, 2899, __pyx_L1_error)
      __pyx_t_3 = __pyx_v_s;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_es = ((struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":2900
 *             elif typeSchema is _EnumSchema:
 *                 es = s
 *                 self.thisptr = capnp.listSchemaOfEnum(es.thisptr)             # <<<<<<<<<<<<<<
 *             elif typeSchema is _InterfaceSchema:
 *                 iis = s
 */
      __pyx_v_self->thisptr =  ::capnp::ListSchema::of(__pyx_v_es->thisptr);

      /* "capnp/lib/capnp.pyx":2898
 *                 ss = s
 *                 self.thisptr = capnp.listSchemaOfStruct(ss.thisptr)
 *             elif typeSchema is _EnumSchema:             # <<<<<<<<<<<<<<
 *                 es = s
 *                 self.thisptr = capnp.listSchemaOfEnum(es.thisptr)
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":2901
 *                 es = s
 *                 self.thisptr = capnp.listSchemaOfEnum(es.thisptr)
 *             elif typeSchema is _InterfaceSchema:             # <<<<<<<<<<<<<<
 *                 iis = s
 *                 self.thisptr = capnp.listSchemaOfInterface(iis.thisptr)
 */
    __pyx_t_1 = (__pyx_v_typeSchema == __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "capnp/lib/capnp.pyx":2902
 *                 self.thisptr = capnp.listSchemaOfEnum(es.thisptr)
 *             elif typeSchema is _InterfaceSchema:
 *                 iis = s             # <<<<<<<<<<<<<<
 *                 self.thisptr = capnp.listSchemaOfInterface(iis.thisptr)
 *             elif typeSchema is _ListSchema:
 */
      if (!(likely(((__pyx_v_s) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_s, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(0, 2902, __pyx_L1_error)
      __pyx_t_3 = __pyx_v_s;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_iis = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":2903
 *             elif typeSchema is _InterfaceSchema:
 *                 iis = s
 *                 self.thisptr = capnp.listSchemaOfInterface(iis.thisptr)             # <<<<<<<<<<<<<<
 *             elif typeSchema is _ListSchema:
 *                 ls = s
 */
      __pyx_v_self->thisptr =  ::capnp::ListSchema::of(__pyx_v_iis->thisptr);

      /* "capnp/lib/capnp.pyx":2901
 *                 es = s
 *                 self.thisptr = capnp.listSchemaOfEnum(es.thisptr)
 *             elif typeSchema is _InterfaceSchema:             # <<<<<<<<<<<<<<
 *                 iis = s
 *                 self.thisptr = capnp.listSchemaOfInterface(iis.thisptr)
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":2904
 *                 iis = s
 *                 self.thisptr = capnp.listSchemaOfInterface(iis.thisptr)
 *             elif typeSchema is _ListSchema:             # <<<<<<<<<<<<<<
 *                 ls = s
 *                 self.thisptr = capnp.listSchemaOfList(ls.thisptr)
 */
    __pyx_t_2 = (__pyx_v_typeSchema == __pyx_ptype_5capnp_3lib_5capnp__ListSchema);
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "capnp/lib/capnp.pyx":2905
 *                 self.thisptr = capnp.listSchemaOfInterface(iis.thisptr)
 *             elif typeSchema is _ListSchema:
 *                 ls = s             # <<<<<<<<<<<<<<
 *                 self.thisptr = capnp.listSchemaOfList(ls.thisptr)
 *             elif typeSchema is _SchemaType:
 */
      if (!(likely(((__pyx_v_s) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_s, __pyx_ptype_5capnp_3lib_5capnp__ListSchema))))) __PYX_ERR(0, 2905, __pyx_L1_error)
      __pyx_t_3 = __pyx_v_s;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_ls = ((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":2906
 *             elif typeSchema is _ListSchema:
 *                 ls = s
 *                 self.thisptr = capnp.listSchemaOfList(ls.thisptr)             # <<<<<<<<<<<<<<
 *             elif typeSchema is _SchemaType:
 *                 st = s
 */
      __pyx_v_self->thisptr =  ::capnp::ListSchema::of(__pyx_v_ls->thisptr);

      /* "capnp/lib/capnp.pyx":2904
 *                 iis = s
 *                 self.thisptr = capnp.listSchemaOfInterface(iis.thisptr)
 *             elif typeSchema is _ListSchema:             # <<<<<<<<<<<<<<
 *                 ls = s
 *                 self.thisptr = capnp.listSchemaOfList(ls.thisptr)
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":2907
 *                 ls = s
 *                 self.thisptr = capnp.listSchemaOfList(ls.thisptr)
 *             elif typeSchema is _SchemaType:             # <<<<<<<<<<<<<<
 *                 st = s
 *                 self.thisptr = capnp.listSchemaOfType(st.thisptr)
 */
    __pyx_t_1 = (__pyx_v_typeSchema == __pyx_ptype_5capnp_3lib_5capnp__SchemaType);
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (likely(__pyx_t_2)) {

      /* "capnp/lib/capnp.pyx":2908
 *                 self.thisptr = capnp.listSchemaOfList(ls.thisptr)
 *             elif typeSchema is _SchemaType:
 *                 st = s             # <<<<<<<<<<<<<<
 *                 self.thisptr = capnp.listSchemaOfType(st.thisptr)
 *             else:
 */
      if (!(likely(((__pyx_v_s) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_s, __pyx_ptype_5capnp_3lib_5capnp__SchemaType))))) __PYX_ERR(0, 2908, __pyx_L1_error)
      __pyx_t_3 = __pyx_v_s;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_st = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":2909
 *             elif typeSchema is _SchemaType:
 *                 st = s
 *                 self.thisptr = capnp.listSchemaOfType(st.thisptr)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise KjException("Unknown schema type")
 */
      __pyx_v_self->thisptr =  ::capnp::ListSchema::of(__pyx_v_st->thisptr);

      /* "capnp/lib/capnp.pyx":2907
 *                 ls = s
 *                 self.thisptr = capnp.listSchemaOfList(ls.thisptr)
 *             elif typeSchema is _SchemaType:             # <<<<<<<<<<<<<<
 *                 st = s
 *                 self.thisptr = capnp.listSchemaOfType(st.thisptr)
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":2911
 *                 self.thisptr = capnp.listSchemaOfType(st.thisptr)
 *             else:
 *                 raise KjException("Unknown schema type")             # <<<<<<<<<<<<<<
 * 
 *     cdef _init(self, C_ListSchema other):
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_KjException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2911, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && 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);
        }
      }
      __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Unknown_schema_type) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Unknown_schema_type);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2911, __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_ERR(0, 2911, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "capnp/lib/capnp.pyx":2888
 *         cdef _SchemaType st
 * 
 *         if schema is not None:             # <<<<<<<<<<<<<<
 *             if hasattr(schema, 'schema'):
 *                 s = schema.schema
 */
  }

  /* "capnp/lib/capnp.pyx":2881
 *     cdef C_ListSchema thisptr
 * 
 *     def __init__(self, schema=None):             # <<<<<<<<<<<<<<
 *         cdef _StructSchema ss
 *         cdef _EnumSchema es
 */

  /* 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("capnp.lib.capnp._ListSchema.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ss);
  __Pyx_XDECREF((PyObject *)__pyx_v_es);
  __Pyx_XDECREF((PyObject *)__pyx_v_iis);
  __Pyx_XDECREF((PyObject *)__pyx_v_ls);
  __Pyx_XDECREF((PyObject *)__pyx_v_st);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_typeSchema);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2913
 *                 raise KjException("Unknown schema type")
 * 
 *     cdef _init(self, C_ListSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_11_ListSchema__init(struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_self,  ::capnp::ListSchema __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "capnp/lib/capnp.pyx":2914
 * 
 *     cdef _init(self, C_ListSchema other):
 *         self.thisptr = other             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->thisptr = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2915
 *     cdef _init(self, C_ListSchema other):
 *         self.thisptr = other
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property elementType:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2913
 *                 raise KjException("Unknown schema type")
 * 
 *     cdef _init(self, C_ListSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr = other
 *         return self
 */

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

/* "capnp/lib/capnp.pyx":2919
 *     property elementType:
 *         """The schema of the element type of this list"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return typeAsSchema(self.thisptr.getElementType())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_ListSchema_11elementType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_ListSchema_11elementType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_ListSchema_11elementType___get__(((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_ListSchema_11elementType___get__(struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "capnp/lib/capnp.pyx":2920
 *         """The schema of the element type of this list"""
 *         def __get__(self):
 *             return typeAsSchema(self.thisptr.getElementType())             # <<<<<<<<<<<<<<
 * 
 * cdef class _ParsedSchema(_Schema):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_typeAsSchema(__pyx_v_self->thisptr.getElementType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2919
 *     property elementType:
 *         """The schema of the element type of this list"""
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return typeAsSchema(self.thisptr.getElementType())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._ListSchema.elementType.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_ListSchema_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_ListSchema_2__reduce_cython__[] = "_ListSchema.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_ListSchema_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_ListSchema_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_ListSchema_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._ListSchema.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_ListSchema_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_ListSchema_4__setstate_cython__[] = "_ListSchema.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_ListSchema_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_ListSchema_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_ListSchema_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._ListSchema.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2924
 * cdef class _ParsedSchema(_Schema):
 *     cdef C_ParsedSchema thisptr_child
 *     cdef _init_child(self, C_ParsedSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr_child = other
 *         self._init(other)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_13_ParsedSchema__init_child(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_self,  ::capnp::ParsedSchema __pyx_v_other) {
  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("_init_child", 0);

  /* "capnp/lib/capnp.pyx":2925
 *     cdef C_ParsedSchema thisptr_child
 *     cdef _init_child(self, C_ParsedSchema other):
 *         self.thisptr_child = other             # <<<<<<<<<<<<<<
 *         self._init(other)
 *         return self
 */
  __pyx_v_self->thisptr_child = __pyx_v_other;

  /* "capnp/lib/capnp.pyx":2926
 *     cdef _init_child(self, C_ParsedSchema other):
 *         self.thisptr_child = other
 *         self._init(other)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__ParsedSchema *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_5capnp_3lib_5capnp__Schema *)__pyx_v_self), __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2927
 *         self.thisptr_child = other
 *         self._init(other)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_nested(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2924
 * cdef class _ParsedSchema(_Schema):
 *     cdef C_ParsedSchema thisptr_child
 *     cdef _init_child(self, C_ParsedSchema other):             # <<<<<<<<<<<<<<
 *         self.thisptr_child = other
 *         self._init(other)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._ParsedSchema._init_child", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2929
 *         return self
 * 
 *     cpdef get_nested(self, name):             # <<<<<<<<<<<<<<
 *         return _ParsedSchema()._init_child(self.thisptr_child.getNested(name))
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_1get_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_13_ParsedSchema_get_nested(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_self, PyObject *__pyx_v_name, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
   ::capnp::ParsedSchema __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_nested", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nested); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_1get_nested)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_name);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2929, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":2930
 * 
 *     cpdef get_nested(self, name):
 *         return _ParsedSchema()._init_child(self.thisptr_child.getNested(name))             # <<<<<<<<<<<<<<
 * 
 * class _StructABCMeta(type):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__ParsedSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_name); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 2930, __pyx_L1_error)
  try {
    __pyx_t_6 = __pyx_v_self->thisptr_child.getNested(__pyx_t_5);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2930, __pyx_L1_error)
  }
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__ParsedSchema *)((struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *)__pyx_t_1)->__pyx_base.__pyx_vtab)->_init_child(((struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *)__pyx_t_1), __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2930, __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;

  /* "capnp/lib/capnp.pyx":2929
 *         return self
 * 
 *     cpdef get_nested(self, name):             # <<<<<<<<<<<<<<
 *         return _ParsedSchema()._init_child(self.thisptr_child.getNested(name))
 * 
 */

  /* 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("capnp.lib.capnp._ParsedSchema.get_nested", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_1get_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_ParsedSchema_get_nested[] = "_ParsedSchema.get_nested(self, name)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_1get_nested(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_nested (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_ParsedSchema_get_nested(((struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *)__pyx_v_self), ((PyObject *)__pyx_v_name));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_ParsedSchema_get_nested(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_nested", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_13_ParsedSchema_get_nested(__pyx_v_self, __pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2929, __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("capnp.lib.capnp._ParsedSchema.get_nested", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_ParsedSchema_2__reduce_cython__[] = "_ParsedSchema.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_ParsedSchema_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_ParsedSchema_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._ParsedSchema.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_ParsedSchema_4__setstate_cython__[] = "_ParsedSchema.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_ParsedSchema_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_ParsedSchema_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._ParsedSchema.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2934
 * class _StructABCMeta(type):
 *     """A metaclass for the Type.Reader and Type.Builder ABCs."""
 *     def __instancecheck__(cls, obj):             # <<<<<<<<<<<<<<
 *         return isinstance(obj, cls.__base__) and obj.schema == cls._schema
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_StructABCMeta_1__instancecheck__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_StructABCMeta___instancecheck__[] = "_StructABCMeta.__instancecheck__(cls, obj)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_14_StructABCMeta_1__instancecheck__ = {"__instancecheck__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_14_StructABCMeta_1__instancecheck__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_14_StructABCMeta___instancecheck__};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_StructABCMeta_1__instancecheck__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_obj = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__instancecheck__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_obj,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__instancecheck__", 1, 2, 2, 1); __PYX_ERR(0, 2934, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__instancecheck__") < 0)) __PYX_ERR(0, 2934, __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_cls = values[0];
    __pyx_v_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__instancecheck__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2934, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructABCMeta.__instancecheck__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_StructABCMeta___instancecheck__(__pyx_self, __pyx_v_cls, __pyx_v_obj);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_StructABCMeta___instancecheck__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__instancecheck__", 0);

  /* "capnp/lib/capnp.pyx":2935
 *     """A metaclass for the Type.Reader and Type.Builder ABCs."""
 *     def __instancecheck__(cls, obj):
 *         return isinstance(obj, cls.__base__) and obj.schema == cls._schema             # <<<<<<<<<<<<<<
 * 
 * cdef _new_message(self, kwargs, num_first_segment_words):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_schema_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_1 = __pyx_t_5;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2934
 * class _StructABCMeta(type):
 *     """A metaclass for the Type.Reader and Type.Builder ABCs."""
 *     def __instancecheck__(cls, obj):             # <<<<<<<<<<<<<<
 *         return isinstance(obj, cls.__base__) and obj.schema == cls._schema
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._StructABCMeta.__instancecheck__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2937
 *         return isinstance(obj, cls.__base__) and obj.schema == cls._schema
 * 
 * cdef _new_message(self, kwargs, num_first_segment_words):             # <<<<<<<<<<<<<<
 *     builder = _MallocMessageBuilder(num_first_segment_words)
 *     msg = builder.init_root(self.schema)
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp__new_message(PyObject *__pyx_v_self, PyObject *__pyx_v_kwargs, PyObject *__pyx_v_num_first_segment_words) {
  struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *__pyx_v_builder = NULL;
  PyObject *__pyx_v_msg = 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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_new_message", 0);

  /* "capnp/lib/capnp.pyx":2938
 * 
 * cdef _new_message(self, kwargs, num_first_segment_words):
 *     builder = _MallocMessageBuilder(num_first_segment_words)             # <<<<<<<<<<<<<<
 *     msg = builder.init_root(self.schema)
 *     if kwargs is not None:
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MallocMessageBuilder), __pyx_v_num_first_segment_words); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_builder = ((struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2939
 * cdef _new_message(self, kwargs, num_first_segment_words):
 *     builder = _MallocMessageBuilder(num_first_segment_words)
 *     msg = builder.init_root(self.schema)             # <<<<<<<<<<<<<<
 *     if kwargs is not None:
 *         msg.from_dict(kwargs)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__MallocMessageBuilder *)__pyx_v_builder->__pyx_base.__pyx_vtab)->__pyx_base.init_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_builder), __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_msg = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2940
 *     builder = _MallocMessageBuilder(num_first_segment_words)
 *     msg = builder.init_root(self.schema)
 *     if kwargs is not None:             # <<<<<<<<<<<<<<
 *         msg.from_dict(kwargs)
 *     return msg
 */
  __pyx_t_3 = (__pyx_v_kwargs != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "capnp/lib/capnp.pyx":2941
 *     msg = builder.init_root(self.schema)
 *     if kwargs is not None:
 *         msg.from_dict(kwargs)             # <<<<<<<<<<<<<<
 *     return msg
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_msg, __pyx_n_s_from_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_kwargs) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_kwargs);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2941, __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;

    /* "capnp/lib/capnp.pyx":2940
 *     builder = _MallocMessageBuilder(num_first_segment_words)
 *     msg = builder.init_root(self.schema)
 *     if kwargs is not None:             # <<<<<<<<<<<<<<
 *         msg.from_dict(kwargs)
 *     return msg
 */
  }

  /* "capnp/lib/capnp.pyx":2942
 *     if kwargs is not None:
 *         msg.from_dict(kwargs)
 *     return msg             # <<<<<<<<<<<<<<
 * 
 * class _StructModuleWhich(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_msg);
  __pyx_r = __pyx_v_msg;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2937
 *         return isinstance(obj, cls.__base__) and obj.schema == cls._schema
 * 
 * cdef _new_message(self, kwargs, num_first_segment_words):             # <<<<<<<<<<<<<<
 *     builder = _MallocMessageBuilder(num_first_segment_words)
 *     msg = builder.init_root(self.schema)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._new_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_builder);
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2948
 * 
 * class _StructModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule___init__[] = "_StructModule.__init__(self, schema, name)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule___init__};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_schema,&__pyx_n_s_name,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 2948, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 2948, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2948, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_schema = values[1];
    __pyx_v_name = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2948, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule___init__(__pyx_self, __pyx_v_self, __pyx_v_schema, __pyx_v_name);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_field = NULL;
  PyObject *__pyx_v_raw_field = NULL;
  PyObject *__pyx_v_raw_schema = NULL;
  PyObject *__pyx_v_field_schema = NULL;
  PyObject *__pyx_v_sub_module = NULL;
  PyObject *__pyx_v_union_field = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "capnp/lib/capnp.pyx":2949
 * class _StructModule(object):
 *     def __init__(self, schema, name):
 *         self.schema = schema             # <<<<<<<<<<<<<<
 * 
 *         # Add enums for union fields
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_schema, __pyx_v_schema) < 0) __PYX_ERR(0, 2949, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2952
 * 
 *         # Add enums for union fields
 *         for field, raw_field in zip(schema.node.struct.fields, schema.fields_list):             # <<<<<<<<<<<<<<
 *             if field.which() == 'group':
 *                 name = field.name[0].upper() + field.name[1:]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_struct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_fields_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2952, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2952, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2952, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2952, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2952, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2952, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2952, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2952, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 2952, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2952, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_raw_field, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "capnp/lib/capnp.pyx":2953
 *         # Add enums for union fields
 *         for field, raw_field in zip(schema.node.struct.fields, schema.fields_list):
 *             if field.which() == 'group':             # <<<<<<<<<<<<<<
 *                 name = field.name[0].upper() + field.name[1:]
 *                 raw_schema = raw_field.schema
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_n_s_which); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_group, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2953, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_9) {

      /* "capnp/lib/capnp.pyx":2954
 *         for field, raw_field in zip(schema.node.struct.fields, schema.fields_list):
 *             if field.which() == 'group':
 *                 name = field.name[0].upper() + field.name[1:]             # <<<<<<<<<<<<<<
 *                 raw_schema = raw_field.schema
 *                 field_schema = raw_schema.node.struct
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_upper); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_field, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_6, 1, 0, NULL, NULL, &__pyx_slice__79, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "capnp/lib/capnp.pyx":2955
 *             if field.which() == 'group':
 *                 name = field.name[0].upper() + field.name[1:]
 *                 raw_schema = raw_field.schema             # <<<<<<<<<<<<<<
 *                 field_schema = raw_schema.node.struct
 * 
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_raw_field, __pyx_n_s_schema); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF_SET(__pyx_v_raw_schema, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "capnp/lib/capnp.pyx":2956
 *                 name = field.name[0].upper() + field.name[1:]
 *                 raw_schema = raw_field.schema
 *                 field_schema = raw_schema.node.struct             # <<<<<<<<<<<<<<
 * 
 *                 if field_schema.discriminantCount == 0:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_raw_schema, __pyx_n_s_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_struct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2956, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_field_schema, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "capnp/lib/capnp.pyx":2958
 *                 field_schema = raw_schema.node.struct
 * 
 *                 if field_schema.discriminantCount == 0:             # <<<<<<<<<<<<<<
 *                     sub_module = _StructModule(raw_schema, name)
 *                 else:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_field_schema, __pyx_n_s_discriminantCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2958, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_9) {

        /* "capnp/lib/capnp.pyx":2959
 * 
 *                 if field_schema.discriminantCount == 0:
 *                     sub_module = _StructModule(raw_schema, name)             # <<<<<<<<<<<<<<
 *                 else:
 *                     sub_module = _StructModuleWhich()
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_StructModule); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_raw_schema, __pyx_v_name};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2959, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_raw_schema, __pyx_v_name};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2959, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2959, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
          }
          __Pyx_INCREF(__pyx_v_raw_schema);
          __Pyx_GIVEREF(__pyx_v_raw_schema);
          PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_10, __pyx_v_raw_schema);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_10, __pyx_v_name);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2959, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_sub_module, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "capnp/lib/capnp.pyx":2958
 *                 field_schema = raw_schema.node.struct
 * 
 *                 if field_schema.discriminantCount == 0:             # <<<<<<<<<<<<<<
 *                     sub_module = _StructModule(raw_schema, name)
 *                 else:
 */
        goto __pyx_L8;
      }

      /* "capnp/lib/capnp.pyx":2961
 *                     sub_module = _StructModule(raw_schema, name)
 *                 else:
 *                     sub_module = _StructModuleWhich()             # <<<<<<<<<<<<<<
 *                     setattr(sub_module, 'schema', raw_schema)
 *                     for union_field in field_schema.fields:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_StructModuleWhich); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_sub_module, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "capnp/lib/capnp.pyx":2962
 *                 else:
 *                     sub_module = _StructModuleWhich()
 *                     setattr(sub_module, 'schema', raw_schema)             # <<<<<<<<<<<<<<
 *                     for union_field in field_schema.fields:
 *                         setattr(sub_module, union_field.name, union_field.discriminantValue)
 */
        __pyx_t_11 = PyObject_SetAttr(__pyx_v_sub_module, __pyx_n_s_schema, __pyx_v_raw_schema); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2962, __pyx_L1_error)

        /* "capnp/lib/capnp.pyx":2963
 *                     sub_module = _StructModuleWhich()
 *                     setattr(sub_module, 'schema', raw_schema)
 *                     for union_field in field_schema.fields:             # <<<<<<<<<<<<<<
 *                         setattr(sub_module, union_field.name, union_field.discriminantValue)
 *                 setattr(self, name, sub_module)
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_field_schema, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2963, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
          __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0;
          __pyx_t_13 = NULL;
        } else {
          __pyx_t_12 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2963, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2963, __pyx_L1_error)
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        for (;;) {
          if (likely(!__pyx_t_13)) {
            if (likely(PyList_CheckExact(__pyx_t_1))) {
              if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_1)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2963, __pyx_L1_error)
              #else
              __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2963, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
            } else {
              if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2963, __pyx_L1_error)
              #else
              __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2963, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
            }
          } else {
            __pyx_t_6 = __pyx_t_13(__pyx_t_1);
            if (unlikely(!__pyx_t_6)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 2963, __pyx_L1_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_6);
          }
          __Pyx_XDECREF_SET(__pyx_v_union_field, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "capnp/lib/capnp.pyx":2964
 *                     setattr(sub_module, 'schema', raw_schema)
 *                     for union_field in field_schema.fields:
 *                         setattr(sub_module, union_field.name, union_field.discriminantValue)             # <<<<<<<<<<<<<<
 *                 setattr(self, name, sub_module)
 * 
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_union_field, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2964, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_union_field, __pyx_n_s_discriminantValue); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2964, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_11 = PyObject_SetAttr(__pyx_v_sub_module, __pyx_t_6, __pyx_t_7); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2964, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "capnp/lib/capnp.pyx":2963
 *                     sub_module = _StructModuleWhich()
 *                     setattr(sub_module, 'schema', raw_schema)
 *                     for union_field in field_schema.fields:             # <<<<<<<<<<<<<<
 *                         setattr(sub_module, union_field.name, union_field.discriminantValue)
 *                 setattr(self, name, sub_module)
 */
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L8:;

      /* "capnp/lib/capnp.pyx":2965
 *                     for union_field in field_schema.fields:
 *                         setattr(sub_module, union_field.name, union_field.discriminantValue)
 *                 setattr(self, name, sub_module)             # <<<<<<<<<<<<<<
 * 
 *     def read(self, file, traversal_limit_in_words = None, nesting_limit = None):
 */
      __pyx_t_11 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_sub_module); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2965, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":2953
 *         # Add enums for union fields
 *         for field, raw_field in zip(schema.node.struct.fields, schema.fields_list):
 *             if field.which() == 'group':             # <<<<<<<<<<<<<<
 *                 name = field.name[0].upper() + field.name[1:]
 *                 raw_schema = raw_field.schema
 */
    }

    /* "capnp/lib/capnp.pyx":2952
 * 
 *         # Add enums for union fields
 *         for field, raw_field in zip(schema.node.struct.fields, schema.fields_list):             # <<<<<<<<<<<<<<
 *             if field.which() == 'group':
 *                 name = field.name[0].upper() + field.name[1:]
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2948
 * 
 * class _StructModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 * 
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_field);
  __Pyx_XDECREF(__pyx_v_raw_field);
  __Pyx_XDECREF(__pyx_v_raw_schema);
  __Pyx_XDECREF(__pyx_v_field_schema);
  __Pyx_XDECREF(__pyx_v_sub_module);
  __Pyx_XDECREF(__pyx_v_union_field);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2967
 *                 setattr(self, name, sub_module)
 * 
 *     def read(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the unpacked object read from file.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_3read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_2read[] = "_StructModule.read(self, file, traversal_limit_in_words=None, nesting_limit=None)\nReturns a Reader for the unpacked object read from file.\n\n        :type file: file\n        :param file: A python file-like object. It must be a \"real\" file, with a `fileno()` method.\n\n        :type traversal_limit_in_words: int\n        :param traversal_limit_in_words: Limits how many total words of data are allowed to be traversed. Is actually a uint64_t, and values can be up to 2^64-1. Default is 8*1024*1024.\n\n        :type nesting_limit: int\n        :param nesting_limit: Limits how many total words of data are allowed to be traversed. Default is 64.\n\n        :rtype: :class:`_DynamicStructReader`";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_3read = {"read", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_3read, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_2read};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_3read(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_file = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_file,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read", 0, 2, 4, 1); __PYX_ERR(0, 2967, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 2967, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_file = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2967, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_2read(__pyx_self, __pyx_v_self, __pyx_v_file, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_2read(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *__pyx_v_reader = NULL;
  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("read", 0);

  /* "capnp/lib/capnp.pyx":2980
 * 
 *         :rtype: :class:`_DynamicStructReader`"""
 *         reader = _StreamFdMessageReader(file, traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *         return reader.get_root(self.schema)
 *     def read_multiple(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_file);
  __Pyx_GIVEREF(__pyx_v_file);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_file);
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_traversal_limit_in_words);
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nesting_limit);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StreamFdMessageReader), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_reader = ((struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2981
 *         :rtype: :class:`_DynamicStructReader`"""
 *         reader = _StreamFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)             # <<<<<<<<<<<<<<
 *     def read_multiple(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 *         """Returns an iterable, that when traversed will return Readers for messages.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2981, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StreamFdMessageReader *)__pyx_v_reader->__pyx_base.__pyx_vtab)->__pyx_base.get_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_reader), __pyx_t_2, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 2981, __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;

  /* "capnp/lib/capnp.pyx":2967
 *                 setattr(self, name, sub_module)
 * 
 *     def read(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the unpacked object read from file.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":2982
 *         reader = _StreamFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)
 *     def read_multiple(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_5read_multiple(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_4read_multiple[] = "_StructModule.read_multiple(self, file, traversal_limit_in_words=None, nesting_limit=None, skip_copy=False)\nReturns an iterable, that when traversed will return Readers for messages.\n\n        :type file: file\n        :param file: A python file-like object. It must be a \"real\" file, with a `fileno()` method.\n\n        :type traversal_limit_in_words: int\n        :param traversal_limit_in_words: Limits how many total words of data are allowed to be traversed. Is actually a uint64_t, and values can be up to 2^64-1. Default is 8*1024*1024.\n\n        :type nesting_limit: int\n        :param nesting_limit: Limits how many total words of data are allowed to be traversed. Default is 64.\n\n        :type skip_copy: bool\n        :param skip_copy: By default, each message is copied because the file needs to advance, even if the message is never read completely. Skip this only if you know what you're doing.\n\n        :rtype: Iterable with elements of :class:`_DynamicStructReader`";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_5read_multiple = {"read_multiple", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_5read_multiple, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_4read_multiple};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_5read_multiple(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_file = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  PyObject *__pyx_v_skip_copy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_multiple (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_file,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,&__pyx_n_s_skip_copy,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_multiple", 0, 2, 5, 1); __PYX_ERR(0, 2982, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_copy);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_multiple") < 0)) __PYX_ERR(0, 2982, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_file = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
    __pyx_v_skip_copy = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_multiple", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2982, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_4read_multiple(__pyx_self, __pyx_v_self, __pyx_v_file, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit, __pyx_v_skip_copy);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_4read_multiple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_skip_copy) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_reader = NULL;
  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("read_multiple", 0);

  /* "capnp/lib/capnp.pyx":2998
 * 
 *         :rtype: Iterable with elements of :class:`_DynamicStructReader`"""
 *         reader = _MultipleMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)             # <<<<<<<<<<<<<<
 *         return reader
 *     def read_packed(self, file, traversal_limit_in_words = None, nesting_limit = None):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_file);
  __Pyx_GIVEREF(__pyx_v_file);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_file);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_traversal_limit_in_words);
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_nesting_limit);
  __Pyx_INCREF(__pyx_v_skip_copy);
  __Pyx_GIVEREF(__pyx_v_skip_copy);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_skip_copy);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MultipleMessageReader), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_reader = ((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2999
 *         :rtype: Iterable with elements of :class:`_DynamicStructReader`"""
 *         reader = _MultipleMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader             # <<<<<<<<<<<<<<
 *     def read_packed(self, file, traversal_limit_in_words = None, nesting_limit = None):
 *         """Returns a Reader for the packed object read from file.
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_reader));
  __pyx_r = ((PyObject *)__pyx_v_reader);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":2982
 *         reader = _StreamFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)
 *     def read_multiple(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3000
 *         reader = _MultipleMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader
 *     def read_packed(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the packed object read from file.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_7read_packed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_6read_packed[] = "_StructModule.read_packed(self, file, traversal_limit_in_words=None, nesting_limit=None)\nReturns a Reader for the packed object read from file.\n\n        :type file: file\n        :param file: A python file-like object. It must be a \"real\" file, with a `fileno()` method.\n\n        :type traversal_limit_in_words: int\n        :param traversal_limit_in_words: Limits how many total words of data are allowed to be traversed. Is actually a uint64_t, and values can be up to 2^64-1. Default is 8*1024*1024.\n\n        :type nesting_limit: int\n        :param nesting_limit: Limits how many total words of data are allowed to be traversed. Default is 64.\n\n        :rtype: :class:`_DynamicStructReader`";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_7read_packed = {"read_packed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_7read_packed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_6read_packed};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_7read_packed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_file = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_packed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_file,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_packed", 0, 2, 4, 1); __PYX_ERR(0, 3000, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_packed") < 0)) __PYX_ERR(0, 3000, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_file = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_packed", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3000, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_6read_packed(__pyx_self, __pyx_v_self, __pyx_v_file, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_6read_packed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *__pyx_v_reader = NULL;
  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("read_packed", 0);

  /* "capnp/lib/capnp.pyx":3013
 * 
 *         :rtype: :class:`_DynamicStructReader`"""
 *         reader = _PackedFdMessageReader(file, traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *         return reader.get_root(self.schema)
 *     def read_multiple_packed(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_file);
  __Pyx_GIVEREF(__pyx_v_file);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_file);
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_traversal_limit_in_words);
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nesting_limit);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__PackedFdMessageReader), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_reader = ((struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":3014
 *         :rtype: :class:`_DynamicStructReader`"""
 *         reader = _PackedFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)             # <<<<<<<<<<<<<<
 *     def read_multiple_packed(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 *         """Returns an iterable, that when traversed will return Readers for messages.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedFdMessageReader *)__pyx_v_reader->__pyx_base.__pyx_vtab)->__pyx_base.get_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_reader), __pyx_t_2, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3014, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3014, __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;

  /* "capnp/lib/capnp.pyx":3000
 *         reader = _MultipleMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader
 *     def read_packed(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the packed object read from file.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3015
 *         reader = _PackedFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)
 *     def read_multiple_packed(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_9read_multiple_packed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_8read_multiple_packed[] = "_StructModule.read_multiple_packed(self, file, traversal_limit_in_words=None, nesting_limit=None, skip_copy=False)\nReturns an iterable, that when traversed will return Readers for messages.\n\n        :type file: file\n        :param file: A python file-like object. It must be a \"real\" file, with a `fileno()` method.\n\n        :type traversal_limit_in_words: int\n        :param traversal_limit_in_words: Limits how many total words of data are allowed to be traversed. Is actually a uint64_t, and values can be up to 2^64-1. Default is 8*1024*1024.\n\n        :type nesting_limit: int\n        :param nesting_limit: Limits how many total words of data are allowed to be traversed. Default is 64.\n\n        :type skip_copy: bool\n        :param skip_copy: By default, each message is copied because the file needs to advance, even if the message is never read completely. Skip this only if you know what you're doing.\n\n        :rtype: Iterable with elements of :class:`_DynamicStructReader`";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_9read_multiple_packed = {"read_multiple_packed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_9read_multiple_packed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_8read_multiple_packed};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_9read_multiple_packed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_file = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  PyObject *__pyx_v_skip_copy = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_multiple_packed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_file,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,&__pyx_n_s_skip_copy,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_multiple_packed", 0, 2, 5, 1); __PYX_ERR(0, 3015, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_copy);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_multiple_packed") < 0)) __PYX_ERR(0, 3015, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_file = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
    __pyx_v_skip_copy = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_multiple_packed", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3015, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_multiple_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_8read_multiple_packed(__pyx_self, __pyx_v_self, __pyx_v_file, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit, __pyx_v_skip_copy);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_8read_multiple_packed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_skip_copy) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_reader = NULL;
  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("read_multiple_packed", 0);

  /* "capnp/lib/capnp.pyx":3031
 * 
 *         :rtype: Iterable with elements of :class:`_DynamicStructReader`"""
 *         reader = _MultiplePackedMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)             # <<<<<<<<<<<<<<
 *         return reader
 *     def read_multiple_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_file);
  __Pyx_GIVEREF(__pyx_v_file);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_file);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_traversal_limit_in_words);
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_nesting_limit);
  __Pyx_INCREF(__pyx_v_skip_copy);
  __Pyx_GIVEREF(__pyx_v_skip_copy);
  PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_skip_copy);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MultiplePackedMessageReader), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_reader = ((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3032
 *         :rtype: Iterable with elements of :class:`_DynamicStructReader`"""
 *         reader = _MultiplePackedMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader             # <<<<<<<<<<<<<<
 *     def read_multiple_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 *         """Returns an iterable, that when traversed will return Readers for messages.
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_reader));
  __pyx_r = ((PyObject *)__pyx_v_reader);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3015
 *         reader = _PackedFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)
 *     def read_multiple_packed(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_multiple_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3033
 *         reader = _MultiplePackedMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader
 *     def read_multiple_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_11read_multiple_bytes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_10read_multiple_bytes[] = "_StructModule.read_multiple_bytes(self, buf, traversal_limit_in_words=None, nesting_limit=None)\nReturns an iterable, that when traversed will return Readers for messages.\n\n        :type buf: buffer\n        :param buf: Any Python object that supports the buffer interface.\n\n        :type traversal_limit_in_words: int\n        :param traversal_limit_in_words: Limits how many total words of data are allowed to be traversed. Is actually a uint64_t, and values can be up to 2^64-1. Default is 8*1024*1024.\n\n        :type nesting_limit: int\n        :param nesting_limit: Limits how many total words of data are allowed to be traversed. Default is 64.\n\n        :rtype: Iterable with elements of :class:`_DynamicStructReader`";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_11read_multiple_bytes = {"read_multiple_bytes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_11read_multiple_bytes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_10read_multiple_bytes};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_11read_multiple_bytes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_multiple_bytes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_buf,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_multiple_bytes", 0, 2, 4, 1); __PYX_ERR(0, 3033, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_multiple_bytes") < 0)) __PYX_ERR(0, 3033, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_buf = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_multiple_bytes", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3033, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_multiple_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_10read_multiple_bytes(__pyx_self, __pyx_v_self, __pyx_v_buf, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_10read_multiple_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_reader = NULL;
  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("read_multiple_bytes", 0);

  /* "capnp/lib/capnp.pyx":3046
 * 
 *         :rtype: Iterable with elements of :class:`_DynamicStructReader`"""
 *         reader = _MultipleBytesMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *         return reader
 *     def read_multiple_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_buf);
  __Pyx_GIVEREF(__pyx_v_buf);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_buf);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_traversal_limit_in_words);
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_nesting_limit);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MultipleBytesMessageReader), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_reader = ((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3047
 *         :rtype: Iterable with elements of :class:`_DynamicStructReader`"""
 *         reader = _MultipleBytesMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader             # <<<<<<<<<<<<<<
 *     def read_multiple_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 *         """Returns an iterable, that when traversed will return Readers for messages.
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_reader));
  __pyx_r = ((PyObject *)__pyx_v_reader);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3033
 *         reader = _MultiplePackedMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader
 *     def read_multiple_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_multiple_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3048
 *         reader = _MultipleBytesMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader
 *     def read_multiple_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_13read_multiple_bytes_packed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_12read_multiple_bytes_packed[] = "_StructModule.read_multiple_bytes_packed(self, buf, traversal_limit_in_words=None, nesting_limit=None)\nReturns an iterable, that when traversed will return Readers for messages.\n\n        :type buf: buffer\n        :param buf: Any Python object that supports the buffer interface.\n\n        :type traversal_limit_in_words: int\n        :param traversal_limit_in_words: Limits how many total words of data are allowed to be traversed. Is actually a uint64_t, and values can be up to 2^64-1. Default is 8*1024*1024.\n\n        :type nesting_limit: int\n        :param nesting_limit: Limits how many total words of data are allowed to be traversed. Default is 64.\n\n        :rtype: Iterable with elements of :class:`_DynamicStructReader`";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_13read_multiple_bytes_packed = {"read_multiple_bytes_packed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_13read_multiple_bytes_packed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_12read_multiple_bytes_packed};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_13read_multiple_bytes_packed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_multiple_bytes_packed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_buf,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_multiple_bytes_packed", 0, 2, 4, 1); __PYX_ERR(0, 3048, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_multiple_bytes_packed") < 0)) __PYX_ERR(0, 3048, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_buf = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_multiple_bytes_packed", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3048, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_multiple_bytes_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_12read_multiple_bytes_packed(__pyx_self, __pyx_v_self, __pyx_v_buf, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_12read_multiple_bytes_packed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_reader = NULL;
  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("read_multiple_bytes_packed", 0);

  /* "capnp/lib/capnp.pyx":3061
 * 
 *         :rtype: Iterable with elements of :class:`_DynamicStructReader`"""
 *         reader = _MultipleBytesPackedMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *         return reader
 *     def from_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None, builder=False):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_buf);
  __Pyx_GIVEREF(__pyx_v_buf);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_buf);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_traversal_limit_in_words);
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_nesting_limit);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_reader = ((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3062
 *         :rtype: Iterable with elements of :class:`_DynamicStructReader`"""
 *         reader = _MultipleBytesPackedMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader             # <<<<<<<<<<<<<<
 *     def from_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None, builder=False):
 *         """Returns a Reader for the unpacked object in buf.
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_reader));
  __pyx_r = ((PyObject *)__pyx_v_reader);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3048
 *         reader = _MultipleBytesMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader
 *     def read_multiple_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.read_multiple_bytes_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3063
 *         reader = _MultipleBytesPackedMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader
 *     def from_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None, builder=False):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the unpacked object in buf.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_15from_bytes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_14from_bytes[] = "_StructModule.from_bytes(self, buf, traversal_limit_in_words=None, nesting_limit=None, builder=False)\nReturns a Reader for the unpacked object in buf.\n\n        :type buf: buffer\n        :param buf: Any Python object that supports the buffer interface.\n\n        :type traversal_limit_in_words: int\n        :param traversal_limit_in_words: Limits how many total words of data are allowed to be traversed. Is actually a uint64_t, and values can be up to 2^64-1. Default is 8*1024*1024.\n\n        :type nesting_limit: int\n        :param nesting_limit: Limits how many total words of data are allowed to be traversed. Default is 64.\n\n        :type builder: bool\n        :param builder: If true, return a builder object. This will allow you to change the contents of `buf`, so do this with care.\n\n        :rtype: :class:`_DynamicStructReader` or :class:`_DynamicStructBuilder`\n        ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_15from_bytes = {"from_bytes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_15from_bytes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_14from_bytes};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_15from_bytes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  PyObject *__pyx_v_builder = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_bytes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_buf,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,&__pyx_n_s_builder,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_False));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_bytes", 0, 2, 5, 1); __PYX_ERR(0, 3063, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_builder);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_bytes") < 0)) __PYX_ERR(0, 3063, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_buf = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
    __pyx_v_builder = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_bytes", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3063, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.from_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_14from_bytes(__pyx_self, __pyx_v_self, __pyx_v_buf, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit, __pyx_v_builder);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_14from_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_builder) {
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_bytes", 0);

  /* "capnp/lib/capnp.pyx":3080
 *         :rtype: :class:`_DynamicStructReader` or :class:`_DynamicStructBuilder`
 *         """
 *         if builder:             # <<<<<<<<<<<<<<
 *             # message = _FlatMessageBuilder(buf)
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_builder); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3080, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":3082
 *         if builder:
 *             # message = _FlatMessageBuilder(buf)
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *             return message.get_root(self.schema).as_builder()
 *         else:
 */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_buf);
    __Pyx_GIVEREF(__pyx_v_buf);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_buf);
    __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
    __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_traversal_limit_in_words);
    __Pyx_INCREF(__pyx_v_nesting_limit);
    __Pyx_GIVEREF(__pyx_v_nesting_limit);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_nesting_limit);
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__FlatArrayMessageReader), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3082, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_message = ((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":3083
 *             # message = _FlatMessageBuilder(buf)
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)
 *             return message.get_root(self.schema).as_builder()             # <<<<<<<<<<<<<<
 *         else:
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    try {
      __pyx_t_4 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReader *)__pyx_v_message->__pyx_base.__pyx_vtab)->__pyx_base.get_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_message), __pyx_t_2, 0);
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3083, __pyx_L1_error)
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 3083, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_as_builder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":3080
 *         :rtype: :class:`_DynamicStructReader` or :class:`_DynamicStructBuilder`
 *         """
 *         if builder:             # <<<<<<<<<<<<<<
 *             # message = _FlatMessageBuilder(buf)
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)
 */
  }

  /* "capnp/lib/capnp.pyx":3085
 *             return message.get_root(self.schema).as_builder()
 *         else:
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *             return message.get_root(self.schema)
 *     def from_segments(self, segments, traversal_limit_in_words = None, nesting_limit = None):
 */
  /*else*/ {
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_buf);
    __Pyx_GIVEREF(__pyx_v_buf);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_buf);
    __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
    __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_traversal_limit_in_words);
    __Pyx_INCREF(__pyx_v_nesting_limit);
    __Pyx_GIVEREF(__pyx_v_nesting_limit);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_nesting_limit);
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__FlatArrayMessageReader), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_message = ((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":3086
 *         else:
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)
 *             return message.get_root(self.schema)             # <<<<<<<<<<<<<<
 *     def from_segments(self, segments, traversal_limit_in_words = None, nesting_limit = None):
 *         """Returns a Reader for a list of segment bytes.
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3086, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    try {
      __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReader *)__pyx_v_message->__pyx_base.__pyx_vtab)->__pyx_base.get_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_message), __pyx_t_2, 0);
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3086, __pyx_L1_error)
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 3086, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":3063
 *         reader = _MultipleBytesPackedMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader
 *     def from_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None, builder=False):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the unpacked object in buf.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.from_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3087
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)
 *             return message.get_root(self.schema)
 *     def from_segments(self, segments, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for a list of segment bytes.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_17from_segments(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_16from_segments[] = "_StructModule.from_segments(self, segments, traversal_limit_in_words=None, nesting_limit=None)\nReturns a Reader for a list of segment bytes.\n\n        This avoids making copies.\n\n        NB: This is not currently supported on PyPy.\n\n        :rtype: list\n        ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_17from_segments = {"from_segments", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_17from_segments, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_16from_segments};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_17from_segments(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_segments = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_segments (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_segments,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_segments)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_segments", 0, 2, 4, 1); __PYX_ERR(0, 3087, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_segments") < 0)) __PYX_ERR(0, 3087, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_segments = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_segments", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3087, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.from_segments", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_16from_segments(__pyx_self, __pyx_v_self, __pyx_v_segments, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_16from_segments(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_segments, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *__pyx_v_message = NULL;
  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("from_segments", 0);

  /* "capnp/lib/capnp.pyx":3096
 *         :rtype: list
 *         """
 *         message = _SegmentArrayMessageReader(segments, traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *         return message.get_root(self.schema)
 *     def from_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_segments);
  __Pyx_GIVEREF(__pyx_v_segments);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_segments);
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_traversal_limit_in_words);
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nesting_limit);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SegmentArrayMessageReader), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_message = ((struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":3097
 *         """
 *         message = _SegmentArrayMessageReader(segments, traversal_limit_in_words, nesting_limit)
 *         return message.get_root(self.schema)             # <<<<<<<<<<<<<<
 *     def from_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 *         """Returns a Reader for the packed object in buf.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__SegmentArrayMessageReader *)__pyx_v_message->__pyx_base.__pyx_vtab)->__pyx_base.get_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_message), __pyx_t_2, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3097, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3097, __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;

  /* "capnp/lib/capnp.pyx":3087
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)
 *             return message.get_root(self.schema)
 *     def from_segments(self, segments, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for a list of segment bytes.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.from_segments", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3098
 *         message = _SegmentArrayMessageReader(segments, traversal_limit_in_words, nesting_limit)
 *         return message.get_root(self.schema)
 *     def from_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the packed object in buf.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_19from_bytes_packed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_18from_bytes_packed[] = "_StructModule.from_bytes_packed(self, buf, traversal_limit_in_words=None, nesting_limit=None)\nReturns a Reader for the packed object in buf.\n\n        :type buf: buffer\n        :param buf: Any Python object that supports the readable buffer interface.\n\n        :type traversal_limit_in_words: int\n        :param traversal_limit_in_words: Limits how many total words of data are allowed to be traversed. Is actually a uint64_t, and values can be up to 2^64-1. Default is 8*1024*1024.\n\n        :type nesting_limit: int\n        :param nesting_limit: Limits how many total words of data are allowed to be traversed. Default is 64.\n\n        :rtype: :class:`_DynamicStructReader`\n        ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_19from_bytes_packed = {"from_bytes_packed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_19from_bytes_packed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_18from_bytes_packed};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_19from_bytes_packed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_bytes_packed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_buf,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_bytes_packed", 0, 2, 4, 1); __PYX_ERR(0, 3098, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_bytes_packed") < 0)) __PYX_ERR(0, 3098, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_buf = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_bytes_packed", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3098, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.from_bytes_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_18from_bytes_packed(__pyx_self, __pyx_v_self, __pyx_v_buf, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_18from_bytes_packed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_bytes_packed", 0);

  /* "capnp/lib/capnp.pyx":3112
 *         :rtype: :class:`_DynamicStructReader`
 *         """
 *         return _PackedMessageReaderBytes(buf, traversal_limit_in_words, nesting_limit).get_root(self.schema)             # <<<<<<<<<<<<<<
 *     def __call__(self, num_first_segment_words=None, **kwargs):
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_buf);
  __Pyx_GIVEREF(__pyx_v_buf);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_buf);
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_traversal_limit_in_words);
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nesting_limit);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__PackedMessageReaderBytes), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  try {
    __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedMessageReaderBytes *)((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *)__pyx_t_2)->__pyx_base.__pyx_vtab)->__pyx_base.get_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_t_2), __pyx_t_1, 0);
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3112, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3112, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3098
 *         message = _SegmentArrayMessageReader(segments, traversal_limit_in_words, nesting_limit)
 *         return message.get_root(self.schema)
 *     def from_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the packed object in buf.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.from_bytes_packed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3113
 *         """
 *         return _PackedMessageReaderBytes(buf, traversal_limit_in_words, nesting_limit).get_root(self.schema)
 *     def __call__(self, num_first_segment_words=None, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)
 *     def new_message(self, num_first_segment_words=None, **kwargs):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_21__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_20__call__[] = "_StructModule.__call__(self, num_first_segment_words=None, **kwargs)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_21__call__ = {"__call__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_21__call__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_20__call__};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_21__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_num_first_segment_words = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_num_first_segment_words,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num_first_segment_words);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 3113, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_num_first_segment_words = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3113, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_20__call__(__pyx_self, __pyx_v_self, __pyx_v_num_first_segment_words, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_20__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_first_segment_words, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "capnp/lib/capnp.pyx":3114
 *         return _PackedMessageReaderBytes(buf, traversal_limit_in_words, nesting_limit).get_root(self.schema)
 *     def __call__(self, num_first_segment_words=None, **kwargs):
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)             # <<<<<<<<<<<<<<
 *     def new_message(self, num_first_segment_words=None, **kwargs):
 *         """Returns a newly allocated builder message.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_new_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_first_segment_words, __pyx_v_num_first_segment_words) < 0) __PYX_ERR(0, 3114, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_t_3 = 0;
  if (__Pyx_MergeKeywords(__pyx_t_2, __pyx_v_kwargs) < 0) __PYX_ERR(0, 3114, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3113
 *         """
 *         return _PackedMessageReaderBytes(buf, traversal_limit_in_words, nesting_limit).get_root(self.schema)
 *     def __call__(self, num_first_segment_words=None, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)
 *     def new_message(self, num_first_segment_words=None, **kwargs):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3115
 *     def __call__(self, num_first_segment_words=None, **kwargs):
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)
 *     def new_message(self, num_first_segment_words=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """Returns a newly allocated builder message.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_23new_message(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_13_StructModule_22new_message[] = "_StructModule.new_message(self, num_first_segment_words=None, **kwargs)\nReturns a newly allocated builder message.\n\n        :type num_first_segment_words: int\n        :param num_first_segment_words: Size of the first segment to allocate in the message (in words ie. 8 byte increments)\n\n        :type kwargs: dict\n        :param kwargs: A list of fields and their values to initialize in the struct. Note, this is not an actual argument, but refers to Python's ability to pass keyword arguments. ie. new_message(my_field=100)\n\n        :rtype: :class:`_DynamicStructBuilder`\n        ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_13_StructModule_23new_message = {"new_message", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13_StructModule_23new_message, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_13_StructModule_22new_message};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_13_StructModule_23new_message(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_num_first_segment_words = 0;
  PyObject *__pyx_v_kwargs = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("new_message (wrapper)", 0);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_num_first_segment_words,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_num_first_segment_words);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "new_message") < 0)) __PYX_ERR(0, 3115, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_num_first_segment_words = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("new_message", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3115, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.new_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_13_StructModule_22new_message(__pyx_self, __pyx_v_self, __pyx_v_num_first_segment_words, __pyx_v_kwargs);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_13_StructModule_22new_message(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_first_segment_words, PyObject *__pyx_v_kwargs) {
  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("new_message", 0);

  /* "capnp/lib/capnp.pyx":3126
 *         :rtype: :class:`_DynamicStructBuilder`
 *         """
 *         return _new_message(self, kwargs, num_first_segment_words)             # <<<<<<<<<<<<<<
 * 
 * class _InterfaceModule(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp__new_message(__pyx_v_self, __pyx_v_kwargs, __pyx_v_num_first_segment_words); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3115
 *     def __call__(self, num_first_segment_words=None, **kwargs):
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)
 *     def new_message(self, num_first_segment_words=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """Returns a newly allocated builder message.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StructModule.new_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3129
 * 
 * class _InterfaceModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         def server_init(server_self):
 *             pass
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16_InterfaceModule___init__[] = "_InterfaceModule.__init__(self, schema, name)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_16_InterfaceModule_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_16_InterfaceModule___init__};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_schema,&__pyx_n_s_name,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 3129, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 3129, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3129, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_schema = values[1];
    __pyx_v_name = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3129, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceModule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule___init__(__pyx_self, __pyx_v_self, __pyx_v_schema, __pyx_v_name);

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

/* "capnp/lib/capnp.pyx":3130
 * class _InterfaceModule(object):
 *     def __init__(self, schema, name):
 *         def server_init(server_self):             # <<<<<<<<<<<<<<
 *             pass
 *         self.schema = schema
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_8__init___1server_init(PyObject *__pyx_self, PyObject *__pyx_v_server_self); /*proto*/
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_16_InterfaceModule_8__init___1server_init = {"server_init", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_8__init___1server_init, METH_O, 0};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_8__init___1server_init(PyObject *__pyx_self, PyObject *__pyx_v_server_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("server_init (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule_8__init___server_init(__pyx_self, ((PyObject *)__pyx_v_server_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule_8__init___server_init(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_server_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("server_init", 0);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3129
 * 
 * class _InterfaceModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         def server_init(server_self):
 *             pass
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_server_init = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3130
 * class _InterfaceModule(object):
 *     def __init__(self, schema, name):
 *         def server_init(server_self):             # <<<<<<<<<<<<<<
 *             pass
 *         self.schema = schema
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_16_InterfaceModule_8__init___1server_init, 0, __pyx_n_s_InterfaceModule___init___locals, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_server_init = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3132
 *         def server_init(server_self):
 *             pass
 *         self.schema = schema             # <<<<<<<<<<<<<<
 *         self.Server = type(name + '.Server', (_DynamicCapabilityServer,), {'__init__': server_init, 'schema':schema})
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_schema, __pyx_v_schema) < 0) __PYX_ERR(0, 3132, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3133
 *             pass
 *         self.schema = schema
 *         self.Server = type(name + '.Server', (_DynamicCapabilityServer,), {'__init__': server_init, 'schema':schema})             # <<<<<<<<<<<<<<
 * 
 *     def _new_client(self, server):
 */
  __pyx_t_1 = PyNumber_Add(__pyx_v_name, __pyx_kp_s_Server); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer));
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_init_3, __pyx_v_server_init) < 0) __PYX_ERR(0, 3133, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_schema, __pyx_v_schema) < 0) __PYX_ERR(0, 3133, __pyx_L1_error)
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyType_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_Server_2, __pyx_t_3) < 0) __PYX_ERR(0, 3133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3129
 * 
 * class _InterfaceModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         def server_init(server_self):
 *             pass
 */

  /* 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_AddTraceback("capnp.lib.capnp._InterfaceModule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_server_init);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3135
 *         self.Server = type(name + '.Server', (_DynamicCapabilityServer,), {'__init__': server_init, 'schema':schema})
 * 
 *     def _new_client(self, server):             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityClient()._init_vals(self.schema, server)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_3_new_client(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16_InterfaceModule_2_new_client[] = "_InterfaceModule._new_client(self, server)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_16_InterfaceModule_3_new_client = {"_new_client", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_3_new_client, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_16_InterfaceModule_2_new_client};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_3_new_client(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_server = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_new_client (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_server,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_server)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_new_client", 1, 2, 2, 1); __PYX_ERR(0, 3135, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_new_client") < 0)) __PYX_ERR(0, 3135, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_server = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_new_client", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3135, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceModule._new_client", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule_2_new_client(__pyx_self, __pyx_v_self, __pyx_v_server);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule_2_new_client(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_server) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_new_client", 0);

  /* "capnp/lib/capnp.pyx":3136
 * 
 *     def _new_client(self, server):
 *         return _DynamicCapabilityClient()._init_vals(self.schema, server)             # <<<<<<<<<<<<<<
 * 
 *     def _new_server(self, server):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1)->__pyx_vtab)->_init_vals(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)__pyx_t_1), __pyx_t_2, __pyx_v_server); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3135
 *         self.Server = type(name + '.Server', (_DynamicCapabilityServer,), {'__init__': server_init, 'schema':schema})
 * 
 *     def _new_client(self, server):             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityClient()._init_vals(self.schema, server)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceModule._new_client", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3138
 *         return _DynamicCapabilityClient()._init_vals(self.schema, server)
 * 
 *     def _new_server(self, server):             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityServer(self.schema, server)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_5_new_server(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_16_InterfaceModule_4_new_server[] = "_InterfaceModule._new_server(self, server)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_16_InterfaceModule_5_new_server = {"_new_server", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_5_new_server, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_16_InterfaceModule_4_new_server};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_16_InterfaceModule_5_new_server(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_server = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_new_server (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_server,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_server)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_new_server", 1, 2, 2, 1); __PYX_ERR(0, 3138, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_new_server") < 0)) __PYX_ERR(0, 3138, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_server = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_new_server", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3138, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._InterfaceModule._new_server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule_4_new_server(__pyx_self, __pyx_v_self, __pyx_v_server);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_16_InterfaceModule_4_new_server(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_server) {
  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("_new_server", 0);

  /* "capnp/lib/capnp.pyx":3139
 * 
 *     def _new_server(self, server):
 *         return _DynamicCapabilityServer(self.schema, server)             # <<<<<<<<<<<<<<
 * 
 * class _EnumModule(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_v_server);
  __Pyx_GIVEREF(__pyx_v_server);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_server);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3139, __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;

  /* "capnp/lib/capnp.pyx":3138
 *         return _DynamicCapabilityClient()._init_vals(self.schema, server)
 * 
 *     def _new_server(self, server):             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityServer(self.schema, server)
 * 
 */

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

/* "capnp/lib/capnp.pyx":3142
 * 
 * class _EnumModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 *         for name, val in schema.enumerants.items():
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumModule_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_EnumModule___init__[] = "_EnumModule.__init__(self, schema, name)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_11_EnumModule_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_11_EnumModule_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_11_EnumModule___init__};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_EnumModule_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_schema,&__pyx_n_s_name,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 3142, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 3142, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3142, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_schema = values[1];
    __pyx_v_name = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3142, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._EnumModule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_EnumModule___init__(__pyx_self, __pyx_v_self, __pyx_v_schema, __pyx_v_name);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_EnumModule___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_schema, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_name);

  /* "capnp/lib/capnp.pyx":3143
 * class _EnumModule(object):
 *     def __init__(self, schema, name):
 *         self.schema = schema             # <<<<<<<<<<<<<<
 *         for name, val in schema.enumerants.items():
 *             setattr(self, name, val)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_schema, __pyx_v_schema) < 0) __PYX_ERR(0, 3143, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3144
 *     def __init__(self, schema, name):
 *         self.schema = schema
 *         for name, val in schema.enumerants.items():             # <<<<<<<<<<<<<<
 *             setattr(self, name, val)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_enumerants); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3144, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3144, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3144, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3144, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 3144, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3144, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 3144, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 3144, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "capnp/lib/capnp.pyx":3145
 *         self.schema = schema
 *         for name, val in schema.enumerants.items():
 *             setattr(self, name, val)             # <<<<<<<<<<<<<<
 * 
 * cdef class _StringArrayPtr:
 */
    __pyx_t_9 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_val); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 3145, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3144
 *     def __init__(self, schema, name):
 *         self.schema = schema
 *         for name, val in schema.enumerants.items():             # <<<<<<<<<<<<<<
 *             setattr(self, name, val)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3142
 * 
 * class _EnumModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 *         for name, val in schema.enumerants.items():
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("capnp.lib.capnp._EnumModule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3148
 * 
 * cdef class _StringArrayPtr:
 *     def __cinit__(self, size_t size, parent):             # <<<<<<<<<<<<<<
 *         self.size = size
 *         self.thisptr = <StringPtr *>malloc(sizeof(StringPtr) * size)
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  PyObject *__pyx_v_parent = 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_parent,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parent)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 3148, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3148, __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_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3148, __pyx_L3_error)
    __pyx_v_parent = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3148, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StringArrayPtr.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr___cinit__(((struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)__pyx_v_self), __pyx_v_size, __pyx_v_parent);

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

static int __pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr___cinit__(struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_parent) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "capnp/lib/capnp.pyx":3149
 * cdef class _StringArrayPtr:
 *     def __cinit__(self, size_t size, parent):
 *         self.size = size             # <<<<<<<<<<<<<<
 *         self.thisptr = <StringPtr *>malloc(sizeof(StringPtr) * size)
 *         self.parent = parent
 */
  __pyx_v_self->size = __pyx_v_size;

  /* "capnp/lib/capnp.pyx":3150
 *     def __cinit__(self, size_t size, parent):
 *         self.size = size
 *         self.thisptr = <StringPtr *>malloc(sizeof(StringPtr) * size)             # <<<<<<<<<<<<<<
 *         self.parent = parent
 * 
 */
  __pyx_v_self->thisptr = (( ::kj::StringPtr *)malloc(((sizeof( ::kj::StringPtr)) * __pyx_v_size)));

  /* "capnp/lib/capnp.pyx":3151
 *         self.size = size
 *         self.thisptr = <StringPtr *>malloc(sizeof(StringPtr) * size)
 *         self.parent = parent             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->parent);
  __Pyx_DECREF(__pyx_v_self->parent);
  __pyx_v_self->parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":3148
 * 
 * cdef class _StringArrayPtr:
 *     def __cinit__(self, size_t size, parent):             # <<<<<<<<<<<<<<
 *         self.size = size
 *         self.thisptr = <StringPtr *>malloc(sizeof(StringPtr) * size)
 */

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

/* "capnp/lib/capnp.pyx":3153
 *         self.parent = parent
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         free(self.thisptr)
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3154
 * 
 *     def __dealloc__(self):
 *         free(self.thisptr)             # <<<<<<<<<<<<<<
 * 
 *     cdef ArrayPtr[StringPtr] asArrayPtr(self) except +reraise_kj_exception:
 */
  free(__pyx_v_self->thisptr);

  /* "capnp/lib/capnp.pyx":3153
 *         self.parent = parent
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         free(self.thisptr)
 * 
 */

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

/* "capnp/lib/capnp.pyx":3156
 *         free(self.thisptr)
 * 
 *     cdef ArrayPtr[StringPtr] asArrayPtr(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return ArrayPtr[StringPtr](self.thisptr, self.size)
 * 
 */

static  ::kj::ArrayPtr< ::kj::StringPtr>  __pyx_f_5capnp_3lib_5capnp_15_StringArrayPtr_asArrayPtr(struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_self) {
   ::kj::ArrayPtr< ::kj::StringPtr>  __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("asArrayPtr", 0);

  /* "capnp/lib/capnp.pyx":3157
 * 
 *     cdef ArrayPtr[StringPtr] asArrayPtr(self) except +reraise_kj_exception:
 *         return ArrayPtr[StringPtr](self.thisptr, self.size)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r =  ::kj::ArrayPtr< ::kj::StringPtr> (__pyx_v_self->thisptr, __pyx_v_self->size);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3156
 *         free(self.thisptr)
 * 
 *     cdef ArrayPtr[StringPtr] asArrayPtr(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         return ArrayPtr[StringPtr](self.thisptr, self.size)
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_StringArrayPtr_4__reduce_cython__[] = "_StringArrayPtr.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StringArrayPtr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_StringArrayPtr_6__setstate_cython__[] = "_StringArrayPtr.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_StringArrayPtr_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StringArrayPtr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3166
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = new C_SchemaParser()
 *         self.modules_by_id = {}
 */

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

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

static int __pyx_pf_5capnp_3lib_5capnp_12SchemaParser___cinit__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "capnp/lib/capnp.pyx":3167
 * 
 *     def __cinit__(self):
 *         self.thisptr = new C_SchemaParser()             # <<<<<<<<<<<<<<
 *         self.modules_by_id = {}
 *         self._all_imports = []
 */
  __pyx_v_self->thisptr = new  ::capnp::SchemaParser();

  /* "capnp/lib/capnp.pyx":3168
 *     def __cinit__(self):
 *         self.thisptr = new C_SchemaParser()
 *         self.modules_by_id = {}             # <<<<<<<<<<<<<<
 *         self._all_imports = []
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->modules_by_id);
  __Pyx_DECREF(__pyx_v_self->modules_by_id);
  __pyx_v_self->modules_by_id = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3169
 *         self.thisptr = new C_SchemaParser()
 *         self.modules_by_id = {}
 *         self._all_imports = []             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_all_imports);
  __Pyx_DECREF(__pyx_v_self->_all_imports);
  __pyx_v_self->_all_imports = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3166
 *     """
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.thisptr = new C_SchemaParser()
 *         self.modules_by_id = {}
 */

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

/* "capnp/lib/capnp.pyx":3171
 *         self._all_imports = []
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3172
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     cpdef _parse_disk_file(self, displayName, diskPath, imports) except +reraise_kj_exception:
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":3171
 *         self._all_imports = []
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":3174
 *         del self.thisptr
 * 
 *     cpdef _parse_disk_file(self, displayName, diskPath, imports) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _StringArrayPtr importArray
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_5_parse_disk_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_12SchemaParser__parse_disk_file(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, PyObject *__pyx_v_displayName, PyObject *__pyx_v_diskPath, PyObject *__pyx_v_imports, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *__pyx_v_importArray = 0;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_curr_import = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *__pyx_v_ret = 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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  char *__pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  char *__pyx_t_15;
   ::kj::ArrayPtr< ::kj::StringPtr>  __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_disk_file", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_disk_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_5_parse_disk_file)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && 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);
            __pyx_t_5 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_displayName, __pyx_v_diskPath, __pyx_v_imports};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3174, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_displayName, __pyx_v_diskPath, __pyx_v_imports};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3174, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3174, __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(__pyx_v_displayName);
          __Pyx_GIVEREF(__pyx_v_displayName);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_displayName);
          __Pyx_INCREF(__pyx_v_diskPath);
          __Pyx_GIVEREF(__pyx_v_diskPath);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_diskPath);
          __Pyx_INCREF(__pyx_v_imports);
          __Pyx_GIVEREF(__pyx_v_imports);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_imports);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3174, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":3177
 *         cdef _StringArrayPtr importArray
 * 
 *         if self._last_import_array and self._last_import_array.parent == imports:             # <<<<<<<<<<<<<<
 *             importArray = self._last_import_array
 *         else:
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_last_import_array)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3177, __pyx_L1_error)
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->_last_import_array->parent, __pyx_v_imports, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3177, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __pyx_t_8;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_7) {

    /* "capnp/lib/capnp.pyx":3178
 * 
 *         if self._last_import_array and self._last_import_array.parent == imports:
 *             importArray = self._last_import_array             # <<<<<<<<<<<<<<
 *         else:
 *             importArray = _StringArrayPtr(len(imports), imports)
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_last_import_array);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_importArray = ((struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3177
 *         cdef _StringArrayPtr importArray
 * 
 *         if self._last_import_array and self._last_import_array.parent == imports:             # <<<<<<<<<<<<<<
 *             importArray = self._last_import_array
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":3180
 *             importArray = self._last_import_array
 *         else:
 *             importArray = _StringArrayPtr(len(imports), imports)             # <<<<<<<<<<<<<<
 * 
 *             for i in range(len(imports)):
 */
  /*else*/ {
    __pyx_t_9 = PyObject_Length(__pyx_v_imports); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3180, __pyx_L1_error)
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_imports);
    __Pyx_GIVEREF(__pyx_v_imports);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_imports);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__StringArrayPtr), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_importArray = ((struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3182
 *             importArray = _StringArrayPtr(len(imports), imports)
 * 
 *             for i in range(len(imports)):             # <<<<<<<<<<<<<<
 *                 curr_import = imports[i]
 *                 importArray.thisptr[i] = StringPtr(curr_import, <size_t>len(curr_import))
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_imports); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3182, __pyx_L1_error)
    __pyx_t_10 = __pyx_t_9;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "capnp/lib/capnp.pyx":3183
 * 
 *             for i in range(len(imports)):
 *                 curr_import = imports[i]             # <<<<<<<<<<<<<<
 *                 importArray.thisptr[i] = StringPtr(curr_import, <size_t>len(curr_import))
 * 
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_imports, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_curr_import, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "capnp/lib/capnp.pyx":3184
 *             for i in range(len(imports)):
 *                 curr_import = imports[i]
 *                 importArray.thisptr[i] = StringPtr(curr_import, <size_t>len(curr_import))             # <<<<<<<<<<<<<<
 * 
 *             self._all_imports.append(importArray)
 */
      __pyx_t_12 = __Pyx_PyObject_AsWritableString(__pyx_v_curr_import); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 3184, __pyx_L1_error)
      __pyx_t_13 = PyObject_Length(__pyx_v_curr_import); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3184, __pyx_L1_error)
      (__pyx_v_importArray->thisptr[__pyx_v_i]) =  ::kj::StringPtr(__pyx_t_12, ((size_t)__pyx_t_13));
    }

    /* "capnp/lib/capnp.pyx":3186
 *                 importArray.thisptr[i] = StringPtr(curr_import, <size_t>len(curr_import))
 * 
 *             self._all_imports.append(importArray)             # <<<<<<<<<<<<<<
 *             self._last_import_array = importArray
 * 
 */
    if (unlikely(__pyx_v_self->_all_imports == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
      __PYX_ERR(0, 3186, __pyx_L1_error)
    }
    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_self->_all_imports, ((PyObject *)__pyx_v_importArray)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 3186, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3187
 * 
 *             self._all_imports.append(importArray)
 *             self._last_import_array = importArray             # <<<<<<<<<<<<<<
 * 
 *         ret = _ParsedSchema()
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_importArray));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_importArray));
    __Pyx_GOTREF(__pyx_v_self->_last_import_array);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_last_import_array));
    __pyx_v_self->_last_import_array = __pyx_v_importArray;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":3189
 *             self._last_import_array = importArray
 * 
 *         ret = _ParsedSchema()             # <<<<<<<<<<<<<<
 *         # TODO (HaaTa): Convert to parseFromDirectory() as per deprecation note
 *         ret._init_child(self.thisptr.parseDiskFile(displayName, diskPath, importArray.asArrayPtr()))
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__ParsedSchema)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ret = ((struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3191
 *         ret = _ParsedSchema()
 *         # TODO (HaaTa): Convert to parseFromDirectory() as per deprecation note
 *         ret._init_child(self.thisptr.parseDiskFile(displayName, diskPath, importArray.asArrayPtr()))             # <<<<<<<<<<<<<<
 * 
 *         return ret
 */
  __pyx_t_12 = __Pyx_PyObject_AsWritableString(__pyx_v_displayName); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 3191, __pyx_L1_error)
  __pyx_t_15 = __Pyx_PyObject_AsWritableString(__pyx_v_diskPath); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(0, 3191, __pyx_L1_error)
  try {
    __pyx_t_16 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__StringArrayPtr *)__pyx_v_importArray->__pyx_vtab)->asArrayPtr(__pyx_v_importArray);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3191, __pyx_L1_error)
  }
  __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__ParsedSchema *)__pyx_v_ret->__pyx_base.__pyx_vtab)->_init_child(__pyx_v_ret, __pyx_v_self->thisptr->parseDiskFile(__pyx_t_12, __pyx_t_15, __pyx_t_16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3193
 *         ret._init_child(self.thisptr.parseDiskFile(displayName, diskPath, importArray.asArrayPtr()))
 * 
 *         return ret             # <<<<<<<<<<<<<<
 * 
 *     def load(self, file_name, display_name=None, imports=[]):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ret));
  __pyx_r = ((PyObject *)__pyx_v_ret);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3174
 *         del self.thisptr
 * 
 *     cpdef _parse_disk_file(self, displayName, diskPath, imports) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         cdef _StringArrayPtr importArray
 * 
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser._parse_disk_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_importArray);
  __Pyx_XDECREF(__pyx_v_curr_import);
  __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_5_parse_disk_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12SchemaParser_4_parse_disk_file[] = "SchemaParser._parse_disk_file(self, displayName, diskPath, imports)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_5_parse_disk_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_displayName = 0;
  PyObject *__pyx_v_diskPath = 0;
  PyObject *__pyx_v_imports = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_parse_disk_file (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_displayName,&__pyx_n_s_diskPath,&__pyx_n_s_imports,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_displayName)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_diskPath)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_disk_file", 1, 3, 3, 1); __PYX_ERR(0, 3174, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_imports)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_disk_file", 1, 3, 3, 2); __PYX_ERR(0, 3174, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_disk_file") < 0)) __PYX_ERR(0, 3174, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_displayName = values[0];
    __pyx_v_diskPath = values[1];
    __pyx_v_imports = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_parse_disk_file", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3174, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser._parse_disk_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4_parse_disk_file(((struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)__pyx_v_self), __pyx_v_displayName, __pyx_v_diskPath, __pyx_v_imports);

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4_parse_disk_file(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, PyObject *__pyx_v_displayName, PyObject *__pyx_v_diskPath, PyObject *__pyx_v_imports) {
  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("_parse_disk_file", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_12SchemaParser__parse_disk_file(__pyx_v_self, __pyx_v_displayName, __pyx_v_diskPath, __pyx_v_imports, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3174, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3174, __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("capnp.lib.capnp.SchemaParser._parse_disk_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3195
 *         return ret
 * 
 *     def load(self, file_name, display_name=None, imports=[]):             # <<<<<<<<<<<<<<
 *         """Load a Cap'n Proto schema from a file
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_7load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12SchemaParser_6load[] = "SchemaParser.load(self, file_name, display_name=None, imports=[])\nLoad a Cap'n Proto schema from a file\n\n        You will have to load a schema before you can begin doing anything\n        meaningful with this library. Loading a schema is much like loading\n        a Python module (and load even returns a `ModuleType`). Once it's been\n        loaded, you use it much like any other Module::\n\n            parser = capnp.SchemaParser()\n            addressbook = parser.load('addressbook.capnp')\n            print addressbook.qux # qux is a top level constant\n            # 123\n            person = addressbook.Person.new_message()\n\n        :type file_name: str\n        :param file_name: A relative or absolute path to a Cap'n Proto schema\n\n        :type display_name: str\n        :param display_name: The name internally used by the Cap'n Proto library\n            for the loaded schema. By default, it's just os.path.basename(file_name)\n\n        :type imports: list\n        :param imports: A list of str directories to add to the import path.\n\n        :rtype: ModuleType\n        :return: A module corresponding to the loaded schema. You can access\n            parsed schemas and constants with . syntax\n\n        :Raises:\n            - :exc:`exceptions.IOError` if `file_name` doesn't exist\n            - :exc:`KjException` if the Cap'n Proto C++ library has any problems loading the schema\n\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_7load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_file_name = 0;
  PyObject *__pyx_v_display_name = 0;
  PyObject *__pyx_v_imports = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file_name,&__pyx_n_s_display_name,&__pyx_n_s_imports,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k__84;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_display_name);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_imports);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load") < 0)) __PYX_ERR(0, 3195, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_file_name = values[0];
    __pyx_v_display_name = values[1];
    __pyx_v_imports = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3195, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_6load(((struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)__pyx_v_self), __pyx_v_file_name, __pyx_v_display_name, __pyx_v_imports);

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

/* "capnp/lib/capnp.pyx":3228
 * 
 *         """
 *         def _load(nodeSchema, module):             # <<<<<<<<<<<<<<
 *             module._nodeSchema = nodeSchema
 *             nodeProto = nodeSchema.get_proto()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_4load_1_load(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_12SchemaParser_4load_1_load = {"_load", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_4load_1_load, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_4load_1_load(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nodeSchema = 0;
  PyObject *__pyx_v_module = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_load (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nodeSchema,&__pyx_n_s_module,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nodeSchema)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_module)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_load", 1, 2, 2, 1); __PYX_ERR(0, 3228, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_load") < 0)) __PYX_ERR(0, 3228, __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_nodeSchema = values[0];
    __pyx_v_module = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_load", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3228, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser.load._load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load__load(__pyx_self, __pyx_v_nodeSchema, __pyx_v_module);

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

/* "capnp/lib/capnp.pyx":3247
 *                         __slots__ = []
 *                         _schema = local_module.schema
 *                         def __new__(self):             # <<<<<<<<<<<<<<
 *                             raise TypeError('This is an abstract base class')
 *                     class Builder(_DynamicStructBuilder):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_6Reader_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_6Reader_1__new__ = {"__new__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_6Reader_1__new__, METH_O, 0};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_6Reader_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_6Reader___new__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_6Reader___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "capnp/lib/capnp.pyx":3248
 *                         _schema = local_module.schema
 *                         def __new__(self):
 *                             raise TypeError('This is an abstract base class')             # <<<<<<<<<<<<<<
 *                     class Builder(_DynamicStructBuilder):
 *                         """An abstract base class.  Builders are 'instances' of this class."""
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3248, __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_ERR(0, 3248, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3247
 *                         __slots__ = []
 *                         _schema = local_module.schema
 *                         def __new__(self):             # <<<<<<<<<<<<<<
 *                             raise TypeError('This is an abstract base class')
 *                     class Builder(_DynamicStructBuilder):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser.load._load.Reader.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3254
 *                         __slots__ = []
 *                         _schema = local_module.schema
 *                         def __new__(self):             # <<<<<<<<<<<<<<
 *                             raise TypeError('This is an abstract base class')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_7Builder_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_7Builder_1__new__ = {"__new__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_7Builder_1__new__, METH_O, 0};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_7Builder_1__new__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_7Builder___new__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_7Builder___new__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__new__", 0);

  /* "capnp/lib/capnp.pyx":3255
 *                         _schema = local_module.schema
 *                         def __new__(self):
 *                             raise TypeError('This is an abstract base class')             # <<<<<<<<<<<<<<
 * 
 *                     local_module.Reader = Reader
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3255, __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_ERR(0, 3255, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3254
 *                         __slots__ = []
 *                         _schema = local_module.schema
 *                         def __new__(self):             # <<<<<<<<<<<<<<
 *                             raise TypeError('This is an abstract base class')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser.load._load.Builder.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3228
 * 
 *         """
 *         def _load(nodeSchema, module):             # <<<<<<<<<<<<<<
 *             module._nodeSchema = nodeSchema
 *             nodeProto = nodeSchema.get_proto()
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load__load(PyObject *__pyx_self, PyObject *__pyx_v_nodeSchema, PyObject *__pyx_v_module) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *__pyx_cur_scope;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *__pyx_outer_scope;
  PyObject *__pyx_v_nodeProto = NULL;
  PyObject *__pyx_v_node = NULL;
  PyObject *__pyx_v_local_module = NULL;
  PyObject *__pyx_v_schema = NULL;
  PyObject *__pyx_v_proto = NULL;
  PyObject *__pyx_v_Reader = NULL;
  PyObject *__pyx_v_Builder = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_load", 0);
  __pyx_outer_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "capnp/lib/capnp.pyx":3229
 *         """
 *         def _load(nodeSchema, module):
 *             module._nodeSchema = nodeSchema             # <<<<<<<<<<<<<<
 *             nodeProto = nodeSchema.get_proto()
 *             module._nodeProto = nodeProto
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_module, __pyx_n_s_nodeSchema_2, __pyx_v_nodeSchema) < 0) __PYX_ERR(0, 3229, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3230
 *         def _load(nodeSchema, module):
 *             module._nodeSchema = nodeSchema
 *             nodeProto = nodeSchema.get_proto()             # <<<<<<<<<<<<<<
 *             module._nodeProto = nodeProto
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_nodeSchema, __pyx_n_s_get_proto); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_nodeProto = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3231
 *             module._nodeSchema = nodeSchema
 *             nodeProto = nodeSchema.get_proto()
 *             module._nodeProto = nodeProto             # <<<<<<<<<<<<<<
 * 
 *             self.modules_by_id[nodeProto.id] = module
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_module, __pyx_n_s_nodeProto, __pyx_v_nodeProto) < 0) __PYX_ERR(0, 3231, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3233
 *             module._nodeProto = nodeProto
 * 
 *             self.modules_by_id[nodeProto.id] = module             # <<<<<<<<<<<<<<
 * 
 *             for node in nodeProto.nestedNodes:
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3233, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_v_self->modules_by_id == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 3233, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nodeProto, __pyx_n_s_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_self->modules_by_id, __pyx_t_1, __pyx_v_module) < 0)) __PYX_ERR(0, 3233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3235
 *             self.modules_by_id[nodeProto.id] = module
 * 
 *             for node in nodeProto.nestedNodes:             # <<<<<<<<<<<<<<
 *                 local_module = _ModuleType(node.name)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nodeProto, __pyx_n_s_nestedNodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3235, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3235, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3235, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3235, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3235, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3236
 * 
 *             for node in nodeProto.nestedNodes:
 *                 local_module = _ModuleType(node.name)             # <<<<<<<<<<<<<<
 * 
 *                 schema = nodeSchema.get_nested(node.name)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ModuleType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_local_module, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3238
 *                 local_module = _ModuleType(node.name)
 * 
 *                 schema = nodeSchema.get_nested(node.name)             # <<<<<<<<<<<<<<
 *                 proto = schema.get_proto()
 *                 if proto.isStruct:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_nodeSchema, __pyx_n_s_get_nested); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_schema, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3239
 * 
 *                 schema = nodeSchema.get_nested(node.name)
 *                 proto = schema.get_proto()             # <<<<<<<<<<<<<<
 *                 if proto.isStruct:
 *                     local_module = _StructModule(schema.as_struct(), node.name)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_get_proto); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_proto, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3240
 *                 schema = nodeSchema.get_nested(node.name)
 *                 proto = schema.get_proto()
 *                 if proto.isStruct:             # <<<<<<<<<<<<<<
 *                     local_module = _StructModule(schema.as_struct(), node.name)
 *                     class Reader(_DynamicStructReader):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_n_s_isStruct); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3240, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_8) {

      /* "capnp/lib/capnp.pyx":3241
 *                 proto = schema.get_proto()
 *                 if proto.isStruct:
 *                     local_module = _StructModule(schema.as_struct(), node.name)             # <<<<<<<<<<<<<<
 *                     class Reader(_DynamicStructReader):
 *                         """An abstract base class.  Readers are 'instances' of this class."""
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_StructModule); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_as_struct); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && 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);
        }
      }
      __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3241, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3241, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3241, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3241, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7);
        __pyx_t_6 = 0;
        __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3241, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_local_module, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "capnp/lib/capnp.pyx":3242
 *                 if proto.isStruct:
 *                     local_module = _StructModule(schema.as_struct(), node.name)
 *                     class Reader(_DynamicStructReader):             # <<<<<<<<<<<<<<
 *                         """An abstract base class.  Readers are 'instances' of this class."""
 *                         __metaclass__ = _StructABCMeta
 */
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader));
      __Pyx_GIVEREF(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader));
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader));
      __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_Reader, __pyx_n_s_load_locals__load_locals_Reader, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, __pyx_kp_s_An_abstract_base_class_Readers_a); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);

      /* "capnp/lib/capnp.pyx":3244
 *                     class Reader(_DynamicStructReader):
 *                         """An abstract base class.  Readers are 'instances' of this class."""
 *                         __metaclass__ = _StructABCMeta             # <<<<<<<<<<<<<<
 *                         __slots__ = []
 *                         _schema = local_module.schema
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_StructABCMeta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3244, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_metaclass, __pyx_t_7) < 0) __PYX_ERR(0, 3244, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3245
 *                         """An abstract base class.  Readers are 'instances' of this class."""
 *                         __metaclass__ = _StructABCMeta
 *                         __slots__ = []             # <<<<<<<<<<<<<<
 *                         _schema = local_module.schema
 *                         def __new__(self):
 */
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_slots, __pyx_t_7) < 0) __PYX_ERR(0, 3245, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3246
 *                         __metaclass__ = _StructABCMeta
 *                         __slots__ = []
 *                         _schema = local_module.schema             # <<<<<<<<<<<<<<
 *                         def __new__(self):
 *                             raise TypeError('This is an abstract base class')
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_module, __pyx_n_s_schema); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_schema_2, __pyx_t_7) < 0) __PYX_ERR(0, 3246, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3247
 *                         __slots__ = []
 *                         _schema = local_module.schema
 *                         def __new__(self):             # <<<<<<<<<<<<<<
 *                             raise TypeError('This is an abstract base class')
 *                     class Builder(_DynamicStructBuilder):
 */
      __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_6Reader_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_load_locals__load_locals_Reader_2, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3247, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_new, __pyx_t_7) < 0) __PYX_ERR(0, 3247, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3242
 *                 if proto.isStruct:
 *                     local_module = _StructModule(schema.as_struct(), node.name)
 *                     class Reader(_DynamicStructReader):             # <<<<<<<<<<<<<<
 *                         """An abstract base class.  Readers are 'instances' of this class."""
 *                         __metaclass__ = _StructABCMeta
 */
      __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_Reader, __pyx_t_1, __pyx_t_11, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_Reader, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "capnp/lib/capnp.pyx":3249
 *                         def __new__(self):
 *                             raise TypeError('This is an abstract base class')
 *                     class Builder(_DynamicStructBuilder):             # <<<<<<<<<<<<<<
 *                         """An abstract base class.  Builders are 'instances' of this class."""
 *                         __metaclass__ = _StructABCMeta
 */
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder));
      __Pyx_GIVEREF(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder));
      PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder));
      __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_1, __pyx_n_s_Builder, __pyx_n_s_load_locals__load_locals_Builder, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, __pyx_kp_s_An_abstract_base_class_Builders); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);

      /* "capnp/lib/capnp.pyx":3251
 *                     class Builder(_DynamicStructBuilder):
 *                         """An abstract base class.  Builders are 'instances' of this class."""
 *                         __metaclass__ = _StructABCMeta             # <<<<<<<<<<<<<<
 *                         __slots__ = []
 *                         _schema = local_module.schema
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_StructABCMeta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_metaclass, __pyx_t_7) < 0) __PYX_ERR(0, 3251, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3252
 *                         """An abstract base class.  Builders are 'instances' of this class."""
 *                         __metaclass__ = _StructABCMeta
 *                         __slots__ = []             # <<<<<<<<<<<<<<
 *                         _schema = local_module.schema
 *                         def __new__(self):
 */
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_slots, __pyx_t_7) < 0) __PYX_ERR(0, 3252, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3253
 *                         __metaclass__ = _StructABCMeta
 *                         __slots__ = []
 *                         _schema = local_module.schema             # <<<<<<<<<<<<<<
 *                         def __new__(self):
 *                             raise TypeError('This is an abstract base class')
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_module, __pyx_n_s_schema); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_schema_2, __pyx_t_7) < 0) __PYX_ERR(0, 3253, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3254
 *                         __slots__ = []
 *                         _schema = local_module.schema
 *                         def __new__(self):             # <<<<<<<<<<<<<<
 *                             raise TypeError('This is an abstract base class')
 * 
 */
      __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_12SchemaParser_4load_5_load_7Builder_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_load_locals__load_locals_Builder_2, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_new, __pyx_t_7) < 0) __PYX_ERR(0, 3254, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3249
 *                         def __new__(self):
 *                             raise TypeError('This is an abstract base class')
 *                     class Builder(_DynamicStructBuilder):             # <<<<<<<<<<<<<<
 *                         """An abstract base class.  Builders are 'instances' of this class."""
 *                         __metaclass__ = _StructABCMeta
 */
      __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_Builder, __pyx_t_1, __pyx_t_11, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_Builder, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "capnp/lib/capnp.pyx":3257
 *                             raise TypeError('This is an abstract base class')
 * 
 *                     local_module.Reader = Reader             # <<<<<<<<<<<<<<
 *                     local_module.Builder = Builder
 * 
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_local_module, __pyx_n_s_Reader, __pyx_v_Reader) < 0) __PYX_ERR(0, 3257, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":3258
 * 
 *                     local_module.Reader = Reader
 *                     local_module.Builder = Builder             # <<<<<<<<<<<<<<
 * 
 *                     module.__dict__[node.name] = local_module
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_local_module, __pyx_n_s_Builder, __pyx_v_Builder) < 0) __PYX_ERR(0, 3258, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":3260
 *                     local_module.Builder = Builder
 * 
 *                     module.__dict__[node.name] = local_module             # <<<<<<<<<<<<<<
 *                 elif proto.isConst:
 *                     module.__dict__[node.name] = schema.as_const_value()
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_module, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_3, __pyx_v_local_module) < 0)) __PYX_ERR(0, 3260, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":3240
 *                 schema = nodeSchema.get_nested(node.name)
 *                 proto = schema.get_proto()
 *                 if proto.isStruct:             # <<<<<<<<<<<<<<
 *                     local_module = _StructModule(schema.as_struct(), node.name)
 *                     class Reader(_DynamicStructReader):
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":3261
 * 
 *                     module.__dict__[node.name] = local_module
 *                 elif proto.isConst:             # <<<<<<<<<<<<<<
 *                     module.__dict__[node.name] = schema.as_const_value()
 *                 elif proto.isInterface:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_n_s_isConst); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3261, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_8) {

      /* "capnp/lib/capnp.pyx":3262
 *                     module.__dict__[node.name] = local_module
 *                 elif proto.isConst:
 *                     module.__dict__[node.name] = schema.as_const_value()             # <<<<<<<<<<<<<<
 *                 elif proto.isInterface:
 *                     local_module = _InterfaceModule(schema.as_interface(), node.name)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_as_const_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_3 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_module, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_11, __pyx_t_3) < 0)) __PYX_ERR(0, 3262, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":3261
 * 
 *                     module.__dict__[node.name] = local_module
 *                 elif proto.isConst:             # <<<<<<<<<<<<<<
 *                     module.__dict__[node.name] = schema.as_const_value()
 *                 elif proto.isInterface:
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":3263
 *                 elif proto.isConst:
 *                     module.__dict__[node.name] = schema.as_const_value()
 *                 elif proto.isInterface:             # <<<<<<<<<<<<<<
 *                     local_module = _InterfaceModule(schema.as_interface(), node.name)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_n_s_isInterface); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3263, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_8) {

      /* "capnp/lib/capnp.pyx":3264
 *                     module.__dict__[node.name] = schema.as_const_value()
 *                 elif proto.isInterface:
 *                     local_module = _InterfaceModule(schema.as_interface(), node.name)             # <<<<<<<<<<<<<<
 * 
 *                     module.__dict__[node.name] = local_module
 */
      __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_InterfaceModule); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_as_interface); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3264, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3264, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3264, __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_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_7);
        __pyx_t_1 = 0;
        __pyx_t_7 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3264, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF_SET(__pyx_v_local_module, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":3266
 *                     local_module = _InterfaceModule(schema.as_interface(), node.name)
 * 
 *                     module.__dict__[node.name] = local_module             # <<<<<<<<<<<<<<
 *                 elif proto.isEnum:
 *                     local_module = _EnumModule(schema.as_enum(), node.name)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_module, __pyx_n_s_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3266, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3266, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_t_11, __pyx_v_local_module) < 0)) __PYX_ERR(0, 3266, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "capnp/lib/capnp.pyx":3263
 *                 elif proto.isConst:
 *                     module.__dict__[node.name] = schema.as_const_value()
 *                 elif proto.isInterface:             # <<<<<<<<<<<<<<
 *                     local_module = _InterfaceModule(schema.as_interface(), node.name)
 * 
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":3267
 * 
 *                     module.__dict__[node.name] = local_module
 *                 elif proto.isEnum:             # <<<<<<<<<<<<<<
 *                     local_module = _EnumModule(schema.as_enum(), node.name)
 * 
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_proto, __pyx_n_s_isEnum); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3267, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (__pyx_t_8) {

      /* "capnp/lib/capnp.pyx":3268
 *                     module.__dict__[node.name] = local_module
 *                 elif proto.isEnum:
 *                     local_module = _EnumModule(schema.as_enum(), node.name)             # <<<<<<<<<<<<<<
 * 
 *                     module.__dict__[node.name] = local_module
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_EnumModule); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_as_enum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_9 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_9, __pyx_t_7};
        __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3268, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_9, __pyx_t_7};
        __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3268, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__pyx_t_1) {
          __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_t_7);
        __pyx_t_9 = 0;
        __pyx_t_7 = 0;
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_local_module, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "capnp/lib/capnp.pyx":3270
 *                     local_module = _EnumModule(schema.as_enum(), node.name)
 * 
 *                     module.__dict__[node.name] = local_module             # <<<<<<<<<<<<<<
 * 
 *                 _load(schema, local_module)
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_module, __pyx_n_s_dict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_t_3, __pyx_v_local_module) < 0)) __PYX_ERR(0, 3270, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":3267
 * 
 *                     module.__dict__[node.name] = local_module
 *                 elif proto.isEnum:             # <<<<<<<<<<<<<<
 *                     local_module = _EnumModule(schema.as_enum(), node.name)
 * 
 */
    }
    __pyx_L5:;

    /* "capnp/lib/capnp.pyx":3272
 *                     module.__dict__[node.name] = local_module
 * 
 *                 _load(schema, local_module)             # <<<<<<<<<<<<<<
 *         if not _os.path.isfile(file_name):
 *             raise IOError("File not found: " + file_name)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v__load)) { __Pyx_RaiseClosureNameError("_load"); __PYX_ERR(0, 3272, __pyx_L1_error) }
    __pyx_t_3 = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load__load(__pyx_cur_scope->__pyx_v__load, __pyx_v_schema, __pyx_v_local_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":3235
 *             self.modules_by_id[nodeProto.id] = module
 * 
 *             for node in nodeProto.nestedNodes:             # <<<<<<<<<<<<<<
 *                 local_module = _ModuleType(node.name)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":3228
 * 
 *         """
 *         def _load(nodeSchema, module):             # <<<<<<<<<<<<<<
 *             module._nodeSchema = nodeSchema
 *             nodeProto = nodeSchema.get_proto()
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser.load._load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nodeProto);
  __Pyx_XDECREF(__pyx_v_node);
  __Pyx_XDECREF(__pyx_v_local_module);
  __Pyx_XDECREF(__pyx_v_schema);
  __Pyx_XDECREF(__pyx_v_proto);
  __Pyx_XDECREF(__pyx_v_Reader);
  __Pyx_XDECREF(__pyx_v_Builder);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3195
 *         return ret
 * 
 *     def load(self, file_name, display_name=None, imports=[]):             # <<<<<<<<<<<<<<
 *         """Load a Cap'n Proto schema from a file
 * 
 */

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_6load(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, PyObject *__pyx_v_file_name, PyObject *__pyx_v_display_name, PyObject *__pyx_v_imports) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *__pyx_cur_scope;
  PyObject *__pyx_v_module = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_parser = NULL;
  PyObject *__pyx_v_filtered_imports = NULL;
  PyObject *__pyx_v_imp = NULL;
  PyObject *__pyx_v_fileSchema = NULL;
  PyObject *__pyx_v_abs_path = 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;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load", 0);
  __pyx_cur_scope = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *)__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_17_load(__pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_17_load, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 3195, __pyx_L1_error)
  } else {
    __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_INCREF(__pyx_v_display_name);

  /* "capnp/lib/capnp.pyx":3228
 * 
 *         """
 *         def _load(nodeSchema, module):             # <<<<<<<<<<<<<<
 *             module._nodeSchema = nodeSchema
 *             nodeProto = nodeSchema.get_proto()
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_12SchemaParser_4load_1_load, 0, __pyx_n_s_load_locals__load, ((PyObject*)__pyx_cur_scope), __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v__load = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3273
 * 
 *                 _load(schema, local_module)
 *         if not _os.path.isfile(file_name):             # <<<<<<<<<<<<<<
 *             raise IOError("File not found: " + file_name)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_file_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_file_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3273, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "capnp/lib/capnp.pyx":3274
 *                 _load(schema, local_module)
 *         if not _os.path.isfile(file_name):
 *             raise IOError("File not found: " + file_name)             # <<<<<<<<<<<<<<
 * 
 *         if not file_name.endswith('.capnp'):
 */
    __pyx_t_1 = PyNumber_Add(__pyx_kp_s_File_not_found, __pyx_v_file_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3274, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3273
 * 
 *                 _load(schema, local_module)
 *         if not _os.path.isfile(file_name):             # <<<<<<<<<<<<<<
 *             raise IOError("File not found: " + file_name)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":3276
 *             raise IOError("File not found: " + file_name)
 * 
 *         if not file_name.endswith('.capnp'):             # <<<<<<<<<<<<<<
 *             raise ValueError("File does not end with .capnp, {}".format(file_name))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_file_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_kp_s_capnp) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s_capnp);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_5) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "capnp/lib/capnp.pyx":3277
 * 
 *         if not file_name.endswith('.capnp'):
 *             raise ValueError("File does not end with .capnp, {}".format(file_name))             # <<<<<<<<<<<<<<
 * 
 *         if display_name is None:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_File_does_not_end_with_capnp, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_file_name) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_file_name);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 3277, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3276
 *             raise IOError("File not found: " + file_name)
 * 
 *         if not file_name.endswith('.capnp'):             # <<<<<<<<<<<<<<
 *             raise ValueError("File does not end with .capnp, {}".format(file_name))
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":3279
 *             raise ValueError("File does not end with .capnp, {}".format(file_name))
 * 
 *         if display_name is None:             # <<<<<<<<<<<<<<
 *             display_name = _os.path.basename(file_name)
 * 
 */
  __pyx_t_4 = (__pyx_v_display_name == Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "capnp/lib/capnp.pyx":3280
 * 
 *         if display_name is None:
 *             display_name = _os.path.basename(file_name)             # <<<<<<<<<<<<<<
 * 
 *         module = _ModuleType(display_name)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_basename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_file_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_file_name);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_display_name, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3279
 *             raise ValueError("File does not end with .capnp, {}".format(file_name))
 * 
 *         if display_name is None:             # <<<<<<<<<<<<<<
 *             display_name = _os.path.basename(file_name)
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":3282
 *             display_name = _os.path.basename(file_name)
 * 
 *         module = _ModuleType(display_name)             # <<<<<<<<<<<<<<
 *         parser = self
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ModuleType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_display_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_display_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_module = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3283
 * 
 *         module = _ModuleType(display_name)
 *         parser = self             # <<<<<<<<<<<<<<
 * 
 *         module._parser = parser
 */
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
  __pyx_v_parser = __pyx_cur_scope->__pyx_v_self;

  /* "capnp/lib/capnp.pyx":3285
 *         parser = self
 * 
 *         module._parser = parser             # <<<<<<<<<<<<<<
 * 
 *         # Some systems (Windows running pytest) add non-directories to the sys.path used for imports
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_module, __pyx_n_s_parser, ((PyObject *)__pyx_v_parser)) < 0) __PYX_ERR(0, 3285, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3289
 *         # Some systems (Windows running pytest) add non-directories to the sys.path used for imports
 *         # Filter these out so kj doesn't implode when searching paths
 *         filtered_imports = []             # <<<<<<<<<<<<<<
 *         for imp in imports:
 *             if _os.path.isdir(imp):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_filtered_imports = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3290
 *         # Filter these out so kj doesn't implode when searching paths
 *         filtered_imports = []
 *         for imp in imports:             # <<<<<<<<<<<<<<
 *             if _os.path.isdir(imp):
 *                 filtered_imports.append(imp)
 */
  if (likely(PyList_CheckExact(__pyx_v_imports)) || PyTuple_CheckExact(__pyx_v_imports)) {
    __pyx_t_1 = __pyx_v_imports; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_imports); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3290, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3290, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3290, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 3290, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3290, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_7(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3290, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_imp, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":3291
 *         filtered_imports = []
 *         for imp in imports:
 *             if _os.path.isdir(imp):             # <<<<<<<<<<<<<<
 *                 filtered_imports.append(imp)
 *         fileSchema = parser._parse_disk_file(display_name, file_name, filtered_imports)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_isdir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_imp) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_imp);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3291, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {

      /* "capnp/lib/capnp.pyx":3292
 *         for imp in imports:
 *             if _os.path.isdir(imp):
 *                 filtered_imports.append(imp)             # <<<<<<<<<<<<<<
 *         fileSchema = parser._parse_disk_file(display_name, file_name, filtered_imports)
 *         _load(fileSchema, module)
 */
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_filtered_imports, __pyx_v_imp); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 3292, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":3291
 *         filtered_imports = []
 *         for imp in imports:
 *             if _os.path.isdir(imp):             # <<<<<<<<<<<<<<
 *                 filtered_imports.append(imp)
 *         fileSchema = parser._parse_disk_file(display_name, file_name, filtered_imports)
 */
    }

    /* "capnp/lib/capnp.pyx":3290
 *         # Filter these out so kj doesn't implode when searching paths
 *         filtered_imports = []
 *         for imp in imports:             # <<<<<<<<<<<<<<
 *             if _os.path.isdir(imp):
 *                 filtered_imports.append(imp)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3293
 *             if _os.path.isdir(imp):
 *                 filtered_imports.append(imp)
 *         fileSchema = parser._parse_disk_file(display_name, file_name, filtered_imports)             # <<<<<<<<<<<<<<
 *         _load(fileSchema, module)
 * 
 */
  try {
    __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp_SchemaParser *)__pyx_v_parser->__pyx_vtab)->_parse_disk_file(__pyx_v_parser, __pyx_v_display_name, __pyx_v_file_name, __pyx_v_filtered_imports, 0);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3293, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3293, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fileSchema = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3294
 *                 filtered_imports.append(imp)
 *         fileSchema = parser._parse_disk_file(display_name, file_name, filtered_imports)
 *         _load(fileSchema, module)             # <<<<<<<<<<<<<<
 * 
 *         abs_path = _os.path.abspath(file_name)
 */
  __pyx_t_1 = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_4load__load(__pyx_cur_scope->__pyx_v__load, __pyx_v_fileSchema, __pyx_v_module); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3296
 *         _load(fileSchema, module)
 * 
 *         abs_path = _os.path.abspath(file_name)             # <<<<<<<<<<<<<<
 *         module.__path__ = [_os.path.dirname(abs_path)]
 *         module.__file__ = abs_path
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_abspath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_file_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_file_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_abs_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3297
 * 
 *         abs_path = _os.path.abspath(file_name)
 *         module.__path__ = [_os.path.dirname(abs_path)]             # <<<<<<<<<<<<<<
 *         module.__file__ = abs_path
 *         module.schema = fileSchema
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dirname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_abs_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_abs_path);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_module, __pyx_n_s_path_2, __pyx_t_2) < 0) __PYX_ERR(0, 3297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":3298
 *         abs_path = _os.path.abspath(file_name)
 *         module.__path__ = [_os.path.dirname(abs_path)]
 *         module.__file__ = abs_path             # <<<<<<<<<<<<<<
 *         module.schema = fileSchema
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_module, __pyx_n_s_file_2, __pyx_v_abs_path) < 0) __PYX_ERR(0, 3298, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3299
 *         module.__path__ = [_os.path.dirname(abs_path)]
 *         module.__file__ = abs_path
 *         module.schema = fileSchema             # <<<<<<<<<<<<<<
 * 
 *         return module
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_module, __pyx_n_s_schema, __pyx_v_fileSchema) < 0) __PYX_ERR(0, 3299, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3301
 *         module.schema = fileSchema
 * 
 *         return module             # <<<<<<<<<<<<<<
 * 
 * cdef class _MessageBuilder:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_module);
  __pyx_r = __pyx_v_module;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3195
 *         return ret
 * 
 *     def load(self, file_name, display_name=None, imports=[]):             # <<<<<<<<<<<<<<
 *         """Load a Cap'n Proto schema from a file
 * 
 */

  /* 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_8);
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_module);
  __Pyx_XDECREF((PyObject *)__pyx_v_parser);
  __Pyx_XDECREF(__pyx_v_filtered_imports);
  __Pyx_XDECREF(__pyx_v_imp);
  __Pyx_XDECREF(__pyx_v_fileSchema);
  __Pyx_XDECREF(__pyx_v_abs_path);
  __Pyx_XDECREF(__pyx_v_display_name);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pxd":25
 * cdef class SchemaParser:
 *     cdef C_SchemaParser * thisptr
 *     cdef public dict modules_by_id             # <<<<<<<<<<<<<<
 *     cdef list _all_imports
 *     cdef _StringArrayPtr _last_import_array
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id___get__(((struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id___get__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->modules_by_id);
  __pyx_r = __pyx_v_self->modules_by_id;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_2__set__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 25, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_value;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->modules_by_id);
  __Pyx_DECREF(__pyx_v_self->modules_by_id);
  __pyx_v_self->modules_by_id = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser.modules_by_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_4__del__(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->modules_by_id);
  __Pyx_DECREF(__pyx_v_self->modules_by_id);
  __pyx_v_self->modules_by_id = ((PyObject*)Py_None);

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12SchemaParser_8__reduce_cython__[] = "SchemaParser.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_8__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_12SchemaParser_10__setstate_cython__[] = "SchemaParser.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_12SchemaParser_10__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_12SchemaParser_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.SchemaParser.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3308
 *     .. warning:: Don't ever instantiate this class directly. It is only used for inheritance.
 *     """
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder___dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder___dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3309
 *     """
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  delete __pyx_v_self->thisptr;

  /* "capnp/lib/capnp.pyx":3308
 *     .. warning:: Don't ever instantiate this class directly. It is only used for inheritance.
 *     """
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "capnp/lib/capnp.pyx":3311
 *         del self.thisptr
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("This is an abstract base class. You should use MallocMessageBuilder instead")
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_2__init__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_2__init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3312
 * 
 *     def __init__(self):
 *         raise NotImplementedError("This is an abstract base class. You should use MallocMessageBuilder instead")             # <<<<<<<<<<<<<<
 * 
 *     cpdef init_root(self, schema):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3312, __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_ERR(0, 3312, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3311
 *         del self.thisptr
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("This is an abstract base class. You should use MallocMessageBuilder instead")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MessageBuilder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3314
 *         raise NotImplementedError("This is an abstract base class. You should use MallocMessageBuilder instead")
 * 
 *     cpdef init_root(self, schema):             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto structs
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_5init_root(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_init_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_root", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_5init_root)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3314, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":3331
 *         """
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3331, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":3332
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 3332, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3331
 *         """
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":3334
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 *         return _DynamicStructBuilder()._init(self.thisptr.initRootDynamicStruct(s.thisptr), self, True)
 * 
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 3334, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":3335
 *         else:
 *             s = schema
 *         return _DynamicStructBuilder()._init(self.thisptr.initRootDynamicStruct(s.thisptr), self, True)             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_root(self, schema) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.isRoot = 1;
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_1), (( ::capnp::DynamicStruct::Builder)__pyx_v_self->thisptr->initRoot< ::capnp::DynamicStruct>((( ::capnp::StructSchema)__pyx_v_s->thisptr))), ((PyObject *)__pyx_v_self), &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3335, __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;

  /* "capnp/lib/capnp.pyx":3314
 *         raise NotImplementedError("This is an abstract base class. You should use MallocMessageBuilder instead")
 * 
 *     cpdef init_root(self, schema):             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto structs
 * 
 */

  /* 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("capnp.lib.capnp._MessageBuilder.init_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_5init_root(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_4init_root[] = "_MessageBuilder.init_root(self, schema)\nA method for instantiating Cap'n Proto structs\n\n        You will need to pass in a schema to specify which struct to\n        instantiate. Schemas are available in a loaded Cap'n Proto module::\n\n            addressbook = capnp.load('addressbook.capnp')\n            ...\n            person = message.init_root(addressbook.Person)\n\n        :type schema: Schema\n        :param schema: A Cap'n proto schema specifying which struct to instantiate\n\n        :rtype: :class:`_DynamicStructBuilder`\n        :return: An object where you will set all the members\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_5init_root(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init_root (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_4init_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_4init_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("init_root", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_init_root(__pyx_v_self, __pyx_v_schema, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3314, __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("capnp.lib.capnp._MessageBuilder.init_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3337
 *         return _DynamicStructBuilder()._init(self.thisptr.initRootDynamicStruct(s.thisptr), self, True)
 * 
 *     cpdef get_root(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto structs, from an already pre-written buffer
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_7get_root(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_root", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3337, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_7get_root)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3337, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":3356
 *         """
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3356, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":3357
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3357, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 3357, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3356
 *         """
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":3359
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 *         return _DynamicStructBuilder()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self, True)
 * 
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 3359, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":3360
 *         else:
 *             s = schema
 *         return _DynamicStructBuilder()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self, True)             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_root_as_any(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.isRoot = 1;
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)__pyx_t_1), (( ::capnp::DynamicStruct::Builder)__pyx_v_self->thisptr->getRoot< ::capnp::DynamicStruct>((( ::capnp::StructSchema)__pyx_v_s->thisptr))), ((PyObject *)__pyx_v_self), &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3360, __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;

  /* "capnp/lib/capnp.pyx":3337
 *         return _DynamicStructBuilder()._init(self.thisptr.initRootDynamicStruct(s.thisptr), self, True)
 * 
 *     cpdef get_root(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto structs, from an already pre-written buffer
 * 
 */

  /* 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("capnp.lib.capnp._MessageBuilder.get_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_7get_root(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_6get_root[] = "_MessageBuilder.get_root(self, schema)\nA method for instantiating Cap'n Proto structs, from an already pre-written buffer\n\n        Don't use this method unless you know what you're doing. You probably\n        want to use init_root instead::\n\n            addressbook = capnp.load('addressbook.capnp')\n            ...\n            person = message.init_root(addressbook.Person)\n            ...\n            person = message.get_root(addressbook.Person)\n\n        :type schema: Schema\n        :param schema: A Cap'n proto schema specifying which struct to instantiate\n\n        :rtype: :class:`_DynamicStructBuilder`\n        :return: An object where you will set all the members\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_7get_root(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_root (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_6get_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_6get_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_root", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_root(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3337, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3337, __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("capnp.lib.capnp._MessageBuilder.get_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3362
 *         return _DynamicStructBuilder()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self, True)
 * 
 *     cpdef get_root_as_any(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for getting a Cap'n Proto AnyPointer, from an already pre-written buffer
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_9get_root_as_any(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_root_as_any(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_root_as_any", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_root_as_any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3362, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_9get_root_as_any)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3362, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":3370
 *         :return: An AnyPointer that you can set fields in
 *         """
 *         return _DynamicObjectBuilder()._init(self.thisptr.getRootAnyPointer(), self)             # <<<<<<<<<<<<<<
 * 
 *     cpdef set_root(self, value) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectBuilder *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)__pyx_t_1), (( ::capnp::AnyPointer::Builder)__pyx_v_self->thisptr->getRoot< ::capnp::AnyPointer>()), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3370, __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;

  /* "capnp/lib/capnp.pyx":3362
 *         return _DynamicStructBuilder()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self, True)
 * 
 *     cpdef get_root_as_any(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for getting a Cap'n Proto AnyPointer, from an already pre-written buffer
 * 
 */

  /* 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("capnp.lib.capnp._MessageBuilder.get_root_as_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_9get_root_as_any(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_8get_root_as_any[] = "_MessageBuilder.get_root_as_any(self)\nA method for getting a Cap'n Proto AnyPointer, from an already pre-written buffer\n\n        Don't use this method unless you know what you're doing.\n\n        :rtype: :class:`_DynamicObjectBuilder`\n        :return: An AnyPointer that you can set fields in\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_9get_root_as_any(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_root_as_any (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_8get_root_as_any(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_8get_root_as_any(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_root_as_any", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_root_as_any(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3362, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3362, __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("capnp.lib.capnp._MessageBuilder.get_root_as_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3372
 *         return _DynamicObjectBuilder()._init(self.thisptr.getRootAnyPointer(), self)
 * 
 *     cpdef set_root(self, value) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto structs by copying from an existing struct
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_11set_root(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_set_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyTypeObject *__pyx_v_value_type = 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("set_root", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_11set_root)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_value);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3372, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":3380
 *         :rtype: void
 *         """
 *         value_type = type(value)             # <<<<<<<<<<<<<<
 *         if value_type is _DynamicStructBuilder:
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value.as_reader()).thisptr)
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_value)));
  __pyx_v_value_type = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value)));

  /* "capnp/lib/capnp.pyx":3381
 *         """
 *         value_type = type(value)
 *         if value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value.as_reader()).thisptr)
 *             return self.get_root(value.schema)
 */
  __pyx_t_5 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":3382
 *         value_type = type(value)
 *         if value_type is _DynamicStructBuilder:
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value.as_reader()).thisptr)             # <<<<<<<<<<<<<<
 *             return self.get_root(value.schema)
 *         elif value_type is _DynamicStructReader:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_as_reader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_self->thisptr->setRoot< ::capnp::DynamicStruct::Reader>((( ::capnp::DynamicStruct::Reader)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->thisptr));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3383
 *         if value_type is _DynamicStructBuilder:
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value.as_reader()).thisptr)
 *             return self.get_root(value.schema)             # <<<<<<<<<<<<<<
 *         elif value_type is _DynamicStructReader:
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value).thisptr)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    try {
      __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self->__pyx_vtab)->get_root(__pyx_v_self, __pyx_t_1, 0);
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3383, __pyx_L1_error)
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 3383, __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;

    /* "capnp/lib/capnp.pyx":3381
 *         """
 *         value_type = type(value)
 *         if value_type is _DynamicStructBuilder:             # <<<<<<<<<<<<<<
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value.as_reader()).thisptr)
 *             return self.get_root(value.schema)
 */
  }

  /* "capnp/lib/capnp.pyx":3384
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value.as_reader()).thisptr)
 *             return self.get_root(value.schema)
 *         elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value).thisptr)
 *             return self.get_root(value.schema)
 */
  __pyx_t_6 = (__pyx_v_value_type == __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader);
  __pyx_t_5 = (__pyx_t_6 != 0);
  if (__pyx_t_5) {

    /* "capnp/lib/capnp.pyx":3385
 *             return self.get_root(value.schema)
 *         elif value_type is _DynamicStructReader:
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value).thisptr)             # <<<<<<<<<<<<<<
 *             return self.get_root(value.schema)
 * 
 */
    __pyx_v_self->thisptr->setRoot< ::capnp::DynamicStruct::Reader>((( ::capnp::DynamicStruct::Reader)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_v_value)->thisptr));

    /* "capnp/lib/capnp.pyx":3386
 *         elif value_type is _DynamicStructReader:
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value).thisptr)
 *             return self.get_root(value.schema)             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_segments_for_output(self) except +reraise_kj_exception:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_schema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    try {
      __pyx_t_1 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self->__pyx_vtab)->get_root(__pyx_v_self, __pyx_t_2, 0);
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3386, __pyx_L1_error)
    } catch(...) {
      reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
      __PYX_ERR(0, 3386, __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;

    /* "capnp/lib/capnp.pyx":3384
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value.as_reader()).thisptr)
 *             return self.get_root(value.schema)
 *         elif value_type is _DynamicStructReader:             # <<<<<<<<<<<<<<
 *             self.thisptr.setRootDynamicStruct((<_DynamicStructReader>value).thisptr)
 *             return self.get_root(value.schema)
 */
  }

  /* "capnp/lib/capnp.pyx":3372
 *         return _DynamicObjectBuilder()._init(self.thisptr.getRootAnyPointer(), self)
 * 
 *     cpdef set_root(self, value) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto structs by copying from an existing struct
 * 
 */

  /* 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_AddTraceback("capnp.lib.capnp._MessageBuilder.set_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_11set_root(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_10set_root[] = "_MessageBuilder.set_root(self, value)\nA method for instantiating Cap'n Proto structs by copying from an existing struct\n\n        :type value: :class:`_DynamicStructReader`\n        :param value: A Cap'n Proto struct value to copy\n\n        :rtype: void\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_11set_root(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_root (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_10set_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_10set_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_root", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_set_root(__pyx_v_self, __pyx_v_value, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3372, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3372, __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("capnp.lib.capnp._MessageBuilder.set_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3388
 *             return self.get_root(value.schema)
 * 
 *     cpdef get_segments_for_output(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         segments = self.thisptr.getSegmentsForOutput()
 *         res = []
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_13get_segments_for_output(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_segments_for_output(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, int __pyx_skip_dispatch) {
   ::kj::ArrayPtr< const ::kj::ArrayPtr< const ::capnp::word>> __pyx_v_segments;
  PyObject *__pyx_v_res = NULL;
  char const *__pyx_v_ptr;
  PyObject *__pyx_v_segment_bytes = 0;
  size_t __pyx_v_i;
   ::kj::ArrayPtr< const ::capnp::word> __pyx_v_segment;
  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;
  size_t __pyx_t_5;
  size_t __pyx_t_6;
  size_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_segments_for_output", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_segments_for_output); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_13get_segments_for_output)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3388, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":3389
 * 
 *     cpdef get_segments_for_output(self) except +reraise_kj_exception:
 *         segments = self.thisptr.getSegmentsForOutput()             # <<<<<<<<<<<<<<
 *         res = []
 *         cdef const char* ptr
 */
  __pyx_v_segments = __pyx_v_self->thisptr->getSegmentsForOutput();

  /* "capnp/lib/capnp.pyx":3390
 *     cpdef get_segments_for_output(self) except +reraise_kj_exception:
 *         segments = self.thisptr.getSegmentsForOutput()
 *         res = []             # <<<<<<<<<<<<<<
 *         cdef const char* ptr
 *         cdef bytes segment_bytes
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3393
 *         cdef const char* ptr
 *         cdef bytes segment_bytes
 *         for i in range(0, segments.size()):             # <<<<<<<<<<<<<<
 *             segment = segments[i]
 *             ptr = <const char *> segment.begin()
 */
  __pyx_t_5 = __pyx_v_segments.size();
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "capnp/lib/capnp.pyx":3394
 *         cdef bytes segment_bytes
 *         for i in range(0, segments.size()):
 *             segment = segments[i]             # <<<<<<<<<<<<<<
 *             ptr = <const char *> segment.begin()
 *             segment_bytes = ptr[:8*segment.size()]
 */
    __pyx_v_segment = (__pyx_v_segments[__pyx_v_i]);

    /* "capnp/lib/capnp.pyx":3395
 *         for i in range(0, segments.size()):
 *             segment = segments[i]
 *             ptr = <const char *> segment.begin()             # <<<<<<<<<<<<<<
 *             segment_bytes = ptr[:8*segment.size()]
 *             res.append(segment_bytes)
 */
    __pyx_v_ptr = ((char const *)__pyx_v_segment.begin());

    /* "capnp/lib/capnp.pyx":3396
 *             segment = segments[i]
 *             ptr = <const char *> segment.begin()
 *             segment_bytes = ptr[:8*segment.size()]             # <<<<<<<<<<<<<<
 *             res.append(segment_bytes)
 *         return res
 */
    __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_ptr + 0, (8 * __pyx_v_segment.size()) - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_segment_bytes, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3397
 *             ptr = <const char *> segment.begin()
 *             segment_bytes = ptr[:8*segment.size()]
 *             res.append(segment_bytes)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_res, __pyx_v_segment_bytes); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 3397, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":3398
 *             segment_bytes = ptr[:8*segment.size()]
 *             res.append(segment_bytes)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     cpdef new_orphan(self, schema) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3388
 *             return self.get_root(value.schema)
 * 
 *     cpdef get_segments_for_output(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         segments = self.thisptr.getSegmentsForOutput()
 *         res = []
 */

  /* 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("capnp.lib.capnp._MessageBuilder.get_segments_for_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_segment_bytes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_13get_segments_for_output(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_12get_segments_for_output[] = "_MessageBuilder.get_segments_for_output(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_13get_segments_for_output(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_segments_for_output (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_12get_segments_for_output(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_12get_segments_for_output(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_segments_for_output", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_segments_for_output(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3388, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3388, __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("capnp.lib.capnp._MessageBuilder.get_segments_for_output", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3400
 *         return res
 * 
 *     cpdef new_orphan(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto orphans
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_15new_orphan(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_new_orphan(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("new_orphan", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_new_orphan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3400, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_15new_orphan)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3400, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":3416
 *         """
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3416, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":3417
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 3417, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3416
 *         """
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":3419
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 * 
 *         return _DynamicOrphan()._init(self.thisptr.newOrphan(s.thisptr), self)
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 3419, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":3421
 *             s = schema
 * 
 *         return _DynamicOrphan()._init(self.thisptr.newOrphan(s.thisptr), self)             # <<<<<<<<<<<<<<
 * 
 * cdef class _MallocMessageBuilder(_MessageBuilder):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicOrphan)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)__pyx_t_1), (( ::capnp::Orphan< ::capnp::DynamicValue>)__pyx_v_self->thisptr->getOrphanage().newOrphan((( ::capnp::StructSchema)__pyx_v_s->thisptr))), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3421, __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;

  /* "capnp/lib/capnp.pyx":3400
 *         return res
 * 
 *     cpdef new_orphan(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto orphans
 * 
 */

  /* 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("capnp.lib.capnp._MessageBuilder.new_orphan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_15new_orphan(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_14new_orphan[] = "_MessageBuilder.new_orphan(self, schema)\nA method for instantiating Cap'n Proto orphans\n\n        Don't use this method unless you know what you're doing. Orphans are useful for dynamically allocating objects for an unknown sized list, ie::\n\n            addressbook = capnp.load('addressbook.capnp')\n            m = capnp._MallocMessageBuilder()\n            alice = m.new_orphan(addressbook.Person)\n\n        :type schema: Schema\n        :param schema: A Cap'n proto schema specifying which struct to instantiate\n\n        :rtype: :class:`_DynamicOrphan`\n        :return: An orphan representing a :class:`_DynamicStructBuilder`\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_15new_orphan(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("new_orphan (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_14new_orphan(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_14new_orphan(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, PyObject *__pyx_v_schema) {
  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("new_orphan", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_new_orphan(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3400, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3400, __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("capnp.lib.capnp._MessageBuilder.new_orphan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_16__reduce_cython__[] = "_MessageBuilder.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_16__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MessageBuilder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_18__setstate_cython__[] = "_MessageBuilder.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_18__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_15_MessageBuilder_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MessageBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3438
 *         _write_message_to_fd(f.fileno(), message)
 *     """
 *     def __init__(self, size=None):             # <<<<<<<<<<<<<<
 *         if size is None:
 *             self.thisptr = new schema_cpp.MallocMessageBuilder()
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_21_MallocMessageBuilder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_21_MallocMessageBuilder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size = 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_size,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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size);
          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_ERR(0, 3438, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3438, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._MallocMessageBuilder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_MallocMessageBuilder___init__(((struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *)__pyx_v_self), __pyx_v_size);

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

static int __pyx_pf_5capnp_3lib_5capnp_21_MallocMessageBuilder___init__(struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *__pyx_v_self, PyObject *__pyx_v_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3439
 *     """
 *     def __init__(self, size=None):
 *         if size is None:             # <<<<<<<<<<<<<<
 *             self.thisptr = new schema_cpp.MallocMessageBuilder()
 *         else:
 */
  __pyx_t_1 = (__pyx_v_size == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":3440
 *     def __init__(self, size=None):
 *         if size is None:
 *             self.thisptr = new schema_cpp.MallocMessageBuilder()             # <<<<<<<<<<<<<<
 *         else:
 *             self.thisptr = new schema_cpp.MallocMessageBuilder(size)
 */
    __pyx_v_self->__pyx_base.thisptr = new  ::capnp::MallocMessageBuilder();

    /* "capnp/lib/capnp.pyx":3439
 *     """
 *     def __init__(self, size=None):
 *         if size is None:             # <<<<<<<<<<<<<<
 *             self.thisptr = new schema_cpp.MallocMessageBuilder()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":3442
 *             self.thisptr = new schema_cpp.MallocMessageBuilder()
 *         else:
 *             self.thisptr = new schema_cpp.MallocMessageBuilder(size)             # <<<<<<<<<<<<<<
 * 
 * cdef class _MessageReader:
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3442, __pyx_L1_error)
    __pyx_v_self->__pyx_base.thisptr = new  ::capnp::MallocMessageBuilder(__pyx_t_3);
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":3438
 *         _write_message_to_fd(f.fileno(), message)
 *     """
 *     def __init__(self, size=None):             # <<<<<<<<<<<<<<
 *         if size is None:
 *             self.thisptr = new schema_cpp.MallocMessageBuilder()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._MallocMessageBuilder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_MallocMessageBuilder_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_MallocMessageBuilder_2__reduce_cython__[] = "_MallocMessageBuilder.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_MallocMessageBuilder_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_MallocMessageBuilder_2__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_MallocMessageBuilder_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MallocMessageBuilder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_MallocMessageBuilder_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_21_MallocMessageBuilder_4__setstate_cython__[] = "_MallocMessageBuilder.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_21_MallocMessageBuilder_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_21_MallocMessageBuilder_4__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_21_MallocMessageBuilder_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MallocMessageBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3452
 *     cdef schema_cpp.MessageReader * thisptr
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("This is an abstract base class")
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_MessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14_MessageReader___init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3453
 * 
 *     def __init__(self):
 *         raise NotImplementedError("This is an abstract base class")             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_root(self, schema) except +reraise_kj_exception:
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3453, __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_ERR(0, 3453, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3452
 *     cdef schema_cpp.MessageReader * thisptr
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("This is an abstract base class")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3455
 *         raise NotImplementedError("This is an abstract base class")
 * 
 *     cpdef get_root(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto structs
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_3get_root(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_MessageReader_get_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, PyObject *__pyx_v_schema, int __pyx_skip_dispatch) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_root", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_root); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_3get_root)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_schema) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_schema);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3455, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":3473
 *         """
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
  __pyx_t_5 = __Pyx_HasAttr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 3473, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "capnp/lib/capnp.pyx":3474
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):
 *             s = schema.schema             # <<<<<<<<<<<<<<
 *         else:
 *             s = schema
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_schema, __pyx_n_s_schema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3474, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 3474, __pyx_L1_error)
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":3473
 *         """
 *         cdef _StructSchema s
 *         if hasattr(schema, 'schema'):             # <<<<<<<<<<<<<<
 *             s = schema.schema
 *         else:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":3476
 *             s = schema.schema
 *         else:
 *             s = schema             # <<<<<<<<<<<<<<
 *         return _DynamicStructReader()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self)
 * 
 */
  /*else*/ {
    if (!(likely(((__pyx_v_schema) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_schema, __pyx_ptype_5capnp_3lib_5capnp__StructSchema))))) __PYX_ERR(0, 3476, __pyx_L1_error)
    __pyx_t_1 = __pyx_v_schema;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_s = ((struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":3477
 *         else:
 *             s = schema
 *         return _DynamicStructReader()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self)             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_root_as_any(self) except +reraise_kj_exception:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)__pyx_t_1), (( ::capnp::DynamicStruct::Reader)__pyx_v_self->thisptr->getRoot< ::capnp::DynamicStruct>((( ::capnp::StructSchema)__pyx_v_s->thisptr))), ((PyObject *)__pyx_v_self), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3477, __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;

  /* "capnp/lib/capnp.pyx":3455
 *         raise NotImplementedError("This is an abstract base class")
 * 
 *     cpdef get_root(self, schema) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for instantiating Cap'n Proto structs
 * 
 */

  /* 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("capnp.lib.capnp._MessageReader.get_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_3get_root(PyObject *__pyx_v_self, PyObject *__pyx_v_schema); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_MessageReader_2get_root[] = "_MessageReader.get_root(self, schema)\nA method for instantiating Cap'n Proto structs\n\n        You will need to pass in a schema to specify which struct to\n        instantiate. Schemas are available in a loaded Cap'n Proto module::\n\n            addressbook = capnp.load('addressbook.capnp')\n            ...\n            person = message.get_root(addressbook.Person)\n\n        :type schema: Schema\n        :param schema: A Cap'n proto schema specifying which struct to instantiate\n\n        :rtype: :class:`_DynamicStructReader`\n        :return: An object with all the data of the read Cap'n Proto message.\n            Access members with . syntax.\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_3get_root(PyObject *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_root (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_2get_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_schema));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_2get_root(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, PyObject *__pyx_v_schema) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_root", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14_MessageReader_get_root(__pyx_v_self, __pyx_v_schema, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3455, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3455, __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("capnp.lib.capnp._MessageReader.get_root", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3479
 *         return _DynamicStructReader()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self)
 * 
 *     cpdef get_root_as_any(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for getting a Cap'n Proto AnyPointer, from an already pre-written buffer
 * 
 */

static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_5get_root_as_any(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5capnp_3lib_5capnp_14_MessageReader_get_root_as_any(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_root_as_any", 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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_root_as_any); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3479, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_5get_root_as_any)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && 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);
          }
        }
        __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3479, __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;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "capnp/lib/capnp.pyx":3487
 *         :return: An AnyPointer that you can read from
 *         """
 *         return _DynamicObjectReader()._init(self.thisptr.getRootAnyPointer(), self)             # <<<<<<<<<<<<<<
 * 
 * cdef class _StreamFdMessageReader(_MessageReader):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectReader *)((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_t_1)->__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)__pyx_t_1), (( ::capnp::AnyPointer::Reader)__pyx_v_self->thisptr->getRoot< ::capnp::AnyPointer>()), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3487, __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;

  /* "capnp/lib/capnp.pyx":3479
 *         return _DynamicStructReader()._init(self.thisptr.getRootDynamicStruct(s.thisptr), self)
 * 
 *     cpdef get_root_as_any(self) except +reraise_kj_exception:             # <<<<<<<<<<<<<<
 *         """A method for getting a Cap'n Proto AnyPointer, from an already pre-written buffer
 * 
 */

  /* 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("capnp.lib.capnp._MessageReader.get_root_as_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_5get_root_as_any(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_MessageReader_4get_root_as_any[] = "_MessageReader.get_root_as_any(self)\nA method for getting a Cap'n Proto AnyPointer, from an already pre-written buffer\n\n        Don't use this method unless you know what you're doing.\n\n        :rtype: :class:`_DynamicObjectReader`\n        :return: An AnyPointer that you can read from\n        ";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_5get_root_as_any(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_root_as_any (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_4get_root_as_any(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_4get_root_as_any(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_root_as_any", 0);
  __Pyx_XDECREF(__pyx_r);
  try {
    __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp_14_MessageReader_get_root_as_any(__pyx_v_self, 1);
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3479, __pyx_L1_error)
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3479, __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("capnp.lib.capnp._MessageReader.get_root_as_any", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3449
 *     .. warning:: Don't ever instantiate this class. It is only used for inheritance.
 *     """
 *     cdef public object _parent             # <<<<<<<<<<<<<<
 *     cdef schema_cpp.MessageReader * thisptr
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_7_parent___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_7_parent___get__(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_parent);
  __pyx_r = __pyx_v_self->_parent;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7_parent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_7_parent_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_7_parent_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7_parent_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7_parent_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_7_parent_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_7_parent_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_parent);
  __Pyx_DECREF(__pyx_v_self->_parent);
  __pyx_v_self->_parent = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_MessageReader_6__reduce_cython__[] = "_MessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_6__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_MessageReader_8__setstate_cython__[] = "_MessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_MessageReader_8__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_MessageReader_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3501
 *     :Parameters: - fd (`int`) - A file descriptor
 *     """
 *     def __init__(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_file = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 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_file,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3501, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_file = values[0];
    __pyx_v_traversal_limit_in_words = values[1];
    __pyx_v_nesting_limit = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3501, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._StreamFdMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *)__pyx_v_self), __pyx_v_file, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static int __pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
   ::capnp::ReaderOptions __pyx_v_opts;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
   ::capnp::StreamFdMessageReader *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3502
 *     """
 *     def __init__(self, file, traversal_limit_in_words = None, nesting_limit = None):
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 * 
 *         self._parent = file
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":3504
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 *         self._parent = file             # <<<<<<<<<<<<<<
 *         self.thisptr = new schema_cpp.StreamFdMessageReader(file.fileno(), opts)
 * 
 */
  __Pyx_INCREF(__pyx_v_file);
  __Pyx_GIVEREF(__pyx_v_file);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._parent);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._parent);
  __pyx_v_self->__pyx_base._parent = __pyx_v_file;

  /* "capnp/lib/capnp.pyx":3505
 * 
 *         self._parent = file
 *         self.thisptr = new schema_cpp.StreamFdMessageReader(file.fileno(), opts)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = new  ::capnp::StreamFdMessageReader(__pyx_t_4, __pyx_v_opts);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3505, __pyx_L1_error)
  }
  __pyx_v_self->__pyx_base.thisptr = __pyx_t_5;

  /* "capnp/lib/capnp.pyx":3501
 *     :Parameters: - fd (`int`) - A file descriptor
 *     """
 *     def __init__(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._StreamFdMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3507
 *         self.thisptr = new schema_cpp.StreamFdMessageReader(file.fileno(), opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3508
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  delete __pyx_v_self->__pyx_base.thisptr;

  /* "capnp/lib/capnp.pyx":3507
 *         self.thisptr = new schema_cpp.StreamFdMessageReader(file.fileno(), opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_StreamFdMessageReader_4__reduce_cython__[] = "_StreamFdMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StreamFdMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_StreamFdMessageReader_6__setstate_cython__[] = "_StreamFdMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_StreamFdMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._StreamFdMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3523
 *     :Parameters: - fd (`int`) - A file descriptor
 *     """
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader___init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

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

/* "capnp/lib/capnp.pyx":3526
 *         pass
 * 
 *     cdef _init(self, schema_cpp.BufferedInputStream & stream, traversal_limit_in_words = None, nesting_limit = None, parent = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_20_PackedMessageReader__init(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__pyx_v_self,  ::kj::BufferedInputStream &__pyx_v_stream, struct __pyx_opt_args_5capnp_3lib_5capnp_20_PackedMessageReader__init *__pyx_optional_args) {
  PyObject *__pyx_v_traversal_limit_in_words = ((PyObject *)Py_None);
  PyObject *__pyx_v_nesting_limit = ((PyObject *)Py_None);
  PyObject *__pyx_v_parent = ((PyObject *)Py_None);
   ::capnp::ReaderOptions __pyx_v_opts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
   ::capnp::PackedMessageReader *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_traversal_limit_in_words = __pyx_optional_args->traversal_limit_in_words;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_nesting_limit = __pyx_optional_args->nesting_limit;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_parent = __pyx_optional_args->parent;
        }
      }
    }
  }

  /* "capnp/lib/capnp.pyx":3527
 * 
 *     cdef _init(self, schema_cpp.BufferedInputStream & stream, traversal_limit_in_words = None, nesting_limit = None, parent = None):
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 * 
 *         self._parent = parent
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":3529
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         self.thisptr = new schema_cpp.PackedMessageReader(stream, opts)
 *         return self
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._parent);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._parent);
  __pyx_v_self->__pyx_base._parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":3530
 * 
 *         self._parent = parent
 *         self.thisptr = new schema_cpp.PackedMessageReader(stream, opts)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  try {
    __pyx_t_1 = new  ::capnp::PackedMessageReader(__pyx_v_stream, __pyx_v_opts);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3530, __pyx_L1_error)
  }
  __pyx_v_self->__pyx_base.thisptr = __pyx_t_1;

  /* "capnp/lib/capnp.pyx":3531
 *         self._parent = parent
 *         self.thisptr = new schema_cpp.PackedMessageReader(stream, opts)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3526
 *         pass
 * 
 *     cdef _init(self, schema_cpp.BufferedInputStream & stream, traversal_limit_in_words = None, nesting_limit = None, parent = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._PackedMessageReader._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3533
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3534
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  delete __pyx_v_self->__pyx_base.thisptr;

  /* "capnp/lib/capnp.pyx":3533
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_PackedMessageReader_4__reduce_cython__[] = "_PackedMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._PackedMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_20_PackedMessageReader_6__setstate_cython__[] = "_PackedMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_20_PackedMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._PackedMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3541
 *     cdef Py_buffer view
 * 
 *     def __init__(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 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_buf,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3541, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_buf = values[0];
    __pyx_v_traversal_limit_in_words = values[1];
    __pyx_v_nesting_limit = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3541, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._PackedMessageReaderBytes.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes___init__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *)__pyx_v_self), __pyx_v_buf, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static int __pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes___init__(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
   ::capnp::ReaderOptions __pyx_v_opts;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
   ::capnp::PackedMessageReader *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3542
 * 
 *     def __init__(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 * 
 *         self._parent = buf
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":3544
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 *         self._parent = buf             # <<<<<<<<<<<<<<
 * 
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_SIMPLE) != 0:
 */
  __Pyx_INCREF(__pyx_v_buf);
  __Pyx_GIVEREF(__pyx_v_buf);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._parent);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._parent);
  __pyx_v_self->__pyx_base._parent = __pyx_v_buf;

  /* "capnp/lib/capnp.pyx":3546
 *         self._parent = buf
 * 
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_SIMPLE) != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("could not get read buffer")
 * 
 */
  __pyx_t_1 = ((PyObject_GetBuffer(__pyx_v_buf, (&__pyx_v_self->view), PyBUF_SIMPLE) != 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":3547
 * 
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_SIMPLE) != 0:
 *             raise KjException("could not get read buffer")             # <<<<<<<<<<<<<<
 * 
 *         self.stream = new schema_cpp.ArrayInputStream(schema_cpp.ByteArrayPtr(<byte *>self.view.buf, self.view.len))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_could_not_get_read_buffer) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_could_not_get_read_buffer);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3547, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3546
 *         self._parent = buf
 * 
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_SIMPLE) != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("could not get read buffer")
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":3549
 *             raise KjException("could not get read buffer")
 * 
 *         self.stream = new schema_cpp.ArrayInputStream(schema_cpp.ByteArrayPtr(<byte *>self.view.buf, self.view.len))             # <<<<<<<<<<<<<<
 * 
 *         self.thisptr = new schema_cpp.PackedMessageReader(deref(self.stream), opts)
 */
  __pyx_v_self->stream = new  ::kj::ArrayInputStream( ::kj::ArrayPtr< ::capnp::byte>(((__pyx_t_5capnp_8includes_5types_byte *)__pyx_v_self->view.buf), __pyx_v_self->view.len));

  /* "capnp/lib/capnp.pyx":3551
 *         self.stream = new schema_cpp.ArrayInputStream(schema_cpp.ByteArrayPtr(<byte *>self.view.buf, self.view.len))
 * 
 *         self.thisptr = new schema_cpp.PackedMessageReader(deref(self.stream), opts)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  try {
    __pyx_t_5 = new  ::capnp::PackedMessageReader((*__pyx_v_self->stream), __pyx_v_opts);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3551, __pyx_L1_error)
  }
  __pyx_v_self->__pyx_base.thisptr = __pyx_t_5;

  /* "capnp/lib/capnp.pyx":3541
 *     cdef Py_buffer view
 * 
 *     def __init__(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._PackedMessageReaderBytes.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3553
 *         self.thisptr = new schema_cpp.PackedMessageReader(deref(self.stream), opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         del self.stream
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3554
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 *         del self.stream
 *         PyBuffer_Release(&self.view)
 */
  delete __pyx_v_self->__pyx_base.thisptr;

  /* "capnp/lib/capnp.pyx":3555
 *     def __dealloc__(self):
 *         del self.thisptr
 *         del self.stream             # <<<<<<<<<<<<<<
 *         PyBuffer_Release(&self.view)
 * 
 */
  delete __pyx_v_self->stream;

  /* "capnp/lib/capnp.pyx":3556
 *         del self.thisptr
 *         del self.stream
 *         PyBuffer_Release(&self.view)             # <<<<<<<<<<<<<<
 * 
 * cdef class _InputMessageReader(_MessageReader):
 */
  PyBuffer_Release((&__pyx_v_self->view));

  /* "capnp/lib/capnp.pyx":3553
 *         self.thisptr = new schema_cpp.PackedMessageReader(deref(self.stream), opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 *         del self.stream
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_4__reduce_cython__[] = "_PackedMessageReaderBytes.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._PackedMessageReaderBytes.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_6__setstate_cython__[] = "_PackedMessageReaderBytes.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._PackedMessageReaderBytes.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3570
 *     :Parameters: - fd (`int`) - A file descriptor
 *     """
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader___init__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

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

/* "capnp/lib/capnp.pyx":3573
 *         pass
 * 
 *     cdef _init(self, schema_cpp.BufferedInputStream & stream, traversal_limit_in_words = None, nesting_limit = None, parent = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_19_InputMessageReader__init(struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__pyx_v_self,  ::kj::BufferedInputStream &__pyx_v_stream, struct __pyx_opt_args_5capnp_3lib_5capnp_19_InputMessageReader__init *__pyx_optional_args) {
  PyObject *__pyx_v_traversal_limit_in_words = ((PyObject *)Py_None);
  PyObject *__pyx_v_nesting_limit = ((PyObject *)Py_None);
  PyObject *__pyx_v_parent = ((PyObject *)Py_None);
   ::capnp::ReaderOptions __pyx_v_opts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
   ::capnp::InputStreamMessageReader *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_traversal_limit_in_words = __pyx_optional_args->traversal_limit_in_words;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_nesting_limit = __pyx_optional_args->nesting_limit;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_parent = __pyx_optional_args->parent;
        }
      }
    }
  }

  /* "capnp/lib/capnp.pyx":3574
 * 
 *     cdef _init(self, schema_cpp.BufferedInputStream & stream, traversal_limit_in_words = None, nesting_limit = None, parent = None):
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 * 
 *         self._parent = parent
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":3576
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 *         self._parent = parent             # <<<<<<<<<<<<<<
 *         self.thisptr = new schema_cpp.InputStreamMessageReader(stream, opts)
 *         return self
 */
  __Pyx_INCREF(__pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._parent);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._parent);
  __pyx_v_self->__pyx_base._parent = __pyx_v_parent;

  /* "capnp/lib/capnp.pyx":3577
 * 
 *         self._parent = parent
 *         self.thisptr = new schema_cpp.InputStreamMessageReader(stream, opts)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  try {
    __pyx_t_1 = new  ::capnp::InputStreamMessageReader(__pyx_v_stream, __pyx_v_opts);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3577, __pyx_L1_error)
  }
  __pyx_v_self->__pyx_base.thisptr = __pyx_t_1;

  /* "capnp/lib/capnp.pyx":3578
 *         self._parent = parent
 *         self.thisptr = new schema_cpp.InputStreamMessageReader(stream, opts)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3573
 *         pass
 * 
 *     cdef _init(self, schema_cpp.BufferedInputStream & stream, traversal_limit_in_words = None, nesting_limit = None, parent = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._InputMessageReader._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3580
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3581
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  delete __pyx_v_self->__pyx_base.thisptr;

  /* "capnp/lib/capnp.pyx":3580
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_InputMessageReader_4__reduce_cython__[] = "_InputMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._InputMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_InputMessageReader_6__setstate_cython__[] = "_InputMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_InputMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._InputMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3596
 *     :Parameters: - fd (`int`) - A file descriptor
 *     """
 *     def __init__(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_file = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 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_file,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3596, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_file = values[0];
    __pyx_v_traversal_limit_in_words = values[1];
    __pyx_v_nesting_limit = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3596, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._PackedFdMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *)__pyx_v_self), __pyx_v_file, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

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

static int __pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
   ::capnp::ReaderOptions __pyx_v_opts;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
   ::capnp::PackedFdMessageReader *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3597
 *     """
 *     def __init__(self, file, traversal_limit_in_words = None, nesting_limit = None):
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 * 
 *         self._parent = file
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":3599
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 *         self._parent = file             # <<<<<<<<<<<<<<
 *         self.thisptr = new schema_cpp.PackedFdMessageReader(file.fileno(), opts)
 * 
 */
  __Pyx_INCREF(__pyx_v_file);
  __Pyx_GIVEREF(__pyx_v_file);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base._parent);
  __Pyx_DECREF(__pyx_v_self->__pyx_base._parent);
  __pyx_v_self->__pyx_base._parent = __pyx_v_file;

  /* "capnp/lib/capnp.pyx":3600
 * 
 *         self._parent = file
 *         self.thisptr = new schema_cpp.PackedFdMessageReader(file.fileno(), opts)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  try {
    __pyx_t_5 = new  ::capnp::PackedFdMessageReader(__pyx_t_4, __pyx_v_opts);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3600, __pyx_L1_error)
  }
  __pyx_v_self->__pyx_base.thisptr = __pyx_t_5;

  /* "capnp/lib/capnp.pyx":3596
 *     :Parameters: - fd (`int`) - A file descriptor
 *     """
 *     def __init__(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._PackedFdMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3602
 *         self.thisptr = new schema_cpp.PackedFdMessageReader(file.fileno(), opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3603
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  delete __pyx_v_self->__pyx_base.thisptr;

  /* "capnp/lib/capnp.pyx":3602
 *         self.thisptr = new schema_cpp.PackedFdMessageReader(file.fileno(), opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_PackedFdMessageReader_4__reduce_cython__[] = "_PackedFdMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._PackedFdMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_PackedFdMessageReader_6__setstate_cython__[] = "_PackedFdMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_PackedFdMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._PackedFdMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3613
 *     cdef public object traversal_limit_in_words, nesting_limit, schema, file
 * 
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         self.file = file
 *         self.schema = schema
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_file = 0;
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  PyObject *__pyx_v_skip_copy = 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_file,&__pyx_n_s_schema,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,&__pyx_n_s_skip_copy,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); __PYX_ERR(0, 3613, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_copy);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3613, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_file = values[0];
    __pyx_v_schema = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
    __pyx_v_skip_copy = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3613, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self), __pyx_v_file, __pyx_v_schema, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit, __pyx_v_skip_copy);

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

static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_schema, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_skip_copy) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  bool __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3614
 * 
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 *         self.file = file             # <<<<<<<<<<<<<<
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words
 */
  __Pyx_INCREF(__pyx_v_file);
  __Pyx_GIVEREF(__pyx_v_file);
  __Pyx_GOTREF(__pyx_v_self->file);
  __Pyx_DECREF(__pyx_v_self->file);
  __pyx_v_self->file = __pyx_v_file;

  /* "capnp/lib/capnp.pyx":3615
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 *         self.file = file
 *         self.schema = schema             # <<<<<<<<<<<<<<
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit
 */
  __Pyx_INCREF(__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_v_schema);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = __pyx_v_schema;

  /* "capnp/lib/capnp.pyx":3616
 *         self.file = file
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words             # <<<<<<<<<<<<<<
 *         self.nesting_limit = nesting_limit
 *         self.skip_copy = skip_copy
 */
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = __pyx_v_traversal_limit_in_words;

  /* "capnp/lib/capnp.pyx":3617
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit             # <<<<<<<<<<<<<<
 *         self.skip_copy = skip_copy
 * 
 */
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = __pyx_v_nesting_limit;

  /* "capnp/lib/capnp.pyx":3618
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit
 *         self.skip_copy = skip_copy             # <<<<<<<<<<<<<<
 * 
 *         self.stream = new schema_cpp.FdInputStream(file.fileno())
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_skip_copy); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3618, __pyx_L1_error)
  __pyx_v_self->skip_copy = __pyx_t_1;

  /* "capnp/lib/capnp.pyx":3620
 *         self.skip_copy = skip_copy
 * 
 *         self.stream = new schema_cpp.FdInputStream(file.fileno())             # <<<<<<<<<<<<<<
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(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);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->stream = new  ::kj::FdInputStream(__pyx_t_5);

  /* "capnp/lib/capnp.pyx":3621
 * 
 *         self.stream = new schema_cpp.FdInputStream(file.fileno())
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->buffered_stream = new  ::kj::BufferedInputStreamWrapper((*__pyx_v_self->stream));

  /* "capnp/lib/capnp.pyx":3613
 *     cdef public object traversal_limit_in_words, nesting_limit, schema, file
 * 
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         self.file = file
 *         self.schema = schema
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3623
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.stream
 *         del self.buffered_stream
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3624
 * 
 *     def __dealloc__(self):
 *         del self.stream             # <<<<<<<<<<<<<<
 *         del self.buffered_stream
 * 
 */
  delete __pyx_v_self->stream;

  /* "capnp/lib/capnp.pyx":3625
 *     def __dealloc__(self):
 *         del self.stream
 *         del self.buffered_stream             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  delete __pyx_v_self->buffered_stream;

  /* "capnp/lib/capnp.pyx":3623
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.stream
 *         del self.buffered_stream
 */

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

/* "capnp/lib/capnp.pyx":3627
 *         del self.buffered_stream
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             reader = _InputMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4__next__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4__next__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  PyObject *__pyx_v_reader = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_19_InputMessageReader__init __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "capnp/lib/capnp.pyx":3628
 * 
 *     def __next__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _InputMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":3629
 *     def __next__(self):
 *         try:
 *             reader = _InputMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)             # <<<<<<<<<<<<<<
 *             ret = reader.get_root(self.schema)
 *             if not self.skip_copy:
 */
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__InputMessageReader)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3629, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_v_self->traversal_limit_in_words;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __pyx_v_self->nesting_limit;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8.__pyx_n = 3;
      __pyx_t_8.traversal_limit_in_words = __pyx_t_5;
      __pyx_t_8.nesting_limit = __pyx_t_6;
      __pyx_t_8.parent = ((PyObject *)__pyx_v_self);
      __pyx_t_7 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__InputMessageReader *)((struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *)__pyx_t_4)->__pyx_base.__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *)__pyx_t_4), (*__pyx_v_self->buffered_stream), &__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3629, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_reader = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3630
 *         try:
 *             reader = _InputMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)             # <<<<<<<<<<<<<<
 *             if not self.skip_copy:
 *               ret = ret.as_builder().as_reader()
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_reader, __pyx_n_s_get_root); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3630, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_self->schema) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self->schema);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3630, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_ret = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3631
 *             reader = _InputMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 *             if not self.skip_copy:             # <<<<<<<<<<<<<<
 *               ret = ret.as_builder().as_reader()
 *             return ret
 */
      __pyx_t_9 = ((!(__pyx_v_self->skip_copy != 0)) != 0);
      if (__pyx_t_9) {

        /* "capnp/lib/capnp.pyx":3632
 *             ret = reader.get_root(self.schema)
 *             if not self.skip_copy:
 *               ret = ret.as_builder().as_reader()             # <<<<<<<<<<<<<<
 *             return ret
 *         except KjException as e:
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ret, __pyx_n_s_as_builder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3632, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3632, __pyx_L3_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_as_reader); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3632, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && 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 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3632, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "capnp/lib/capnp.pyx":3631
 *             reader = _InputMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 *             if not self.skip_copy:             # <<<<<<<<<<<<<<
 *               ret = ret.as_builder().as_reader()
 *             return ret
 */
      }

      /* "capnp/lib/capnp.pyx":3633
 *             if not self.skip_copy:
 *               ret = ret.as_builder().as_reader()
 *             return ret             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             if 'EOF' in str(e):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_ret);
      __pyx_r = __pyx_v_ret;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":3628
 * 
 *     def __next__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _InputMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "capnp/lib/capnp.pyx":3634
 *               ret = ret.as_builder().as_reader()
 *             return ret
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             if 'EOF' in str(e):
 *                 raise StopIteration
 */
    __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_5, &__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_KjException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3634, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_ErrRestore(__pyx_t_7, __pyx_t_5, __pyx_t_6);
    __pyx_t_7 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    if (__pyx_t_10) {
      __Pyx_AddTraceback("capnp.lib.capnp._MultipleMessageReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 3634, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;

      /* "capnp/lib/capnp.pyx":3635
 *             return ret
 *         except KjException as e:
 *             if 'EOF' in str(e):             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             else:
 */
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3635, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_EOF, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3635, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = (__pyx_t_9 != 0);
      if (unlikely(__pyx_t_11)) {

        /* "capnp/lib/capnp.pyx":3636
 *         except KjException as e:
 *             if 'EOF' in str(e):
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *             else:
 *                 raise
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        __PYX_ERR(0, 3636, __pyx_L5_except_error)

        /* "capnp/lib/capnp.pyx":3635
 *             return ret
 *         except KjException as e:
 *             if 'EOF' in str(e):             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             else:
 */
      }

      /* "capnp/lib/capnp.pyx":3638
 *                 raise StopIteration
 *             else:
 *                 raise             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
      /*else*/ {
        __Pyx_GIVEREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_5, __pyx_t_7);
        __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; 
        __PYX_ERR(0, 3638, __pyx_L5_except_error)
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":3628
 * 
 *     def __next__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _InputMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":3627
 *         del self.buffered_stream
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             reader = _InputMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleMessageReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_reader);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3640
 *                 raise
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_7__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_7__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6__iter__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6__iter__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "capnp/lib/capnp.pyx":3641
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 * cdef class _MultiplePackedMessageReader:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3640
 *                 raise
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "capnp/lib/capnp.pyx":3611
 *     cdef cbool skip_copy
 * 
 *     cdef public object traversal_limit_in_words, nesting_limit, schema, file             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_r = __pyx_v_self->traversal_limit_in_words;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->nesting_limit);
  __pyx_r = __pyx_v_self->nesting_limit;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->schema);
  __pyx_r = __pyx_v_self->schema;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4file___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4file___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->file);
  __pyx_r = __pyx_v_self->file;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->file);
  __Pyx_DECREF(__pyx_v_self->file);
  __pyx_v_self->file = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->file);
  __Pyx_DECREF(__pyx_v_self->file);
  __pyx_v_self->file = Py_None;

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

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_MultipleMessageReader_8__reduce_cython__[] = "_MultipleMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_8__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_MultipleMessageReader_10__setstate_cython__[] = "_MultipleMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_10__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_MultipleMessageReader_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3650
 *     cdef public object traversal_limit_in_words, nesting_limit, schema, file
 * 
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         self.file = file
 *         self.schema = schema
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_file = 0;
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 0;
  PyObject *__pyx_v_skip_copy = 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_file,&__pyx_n_s_schema,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,&__pyx_n_s_skip_copy,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); __PYX_ERR(0, 3650, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_copy);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3650, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_file = values[0];
    __pyx_v_schema = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
    __pyx_v_skip_copy = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3650, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._MultiplePackedMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self), __pyx_v_file, __pyx_v_schema, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit, __pyx_v_skip_copy);

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

static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_schema, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit, PyObject *__pyx_v_skip_copy) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  bool __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3651
 * 
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 *         self.file = file             # <<<<<<<<<<<<<<
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words
 */
  __Pyx_INCREF(__pyx_v_file);
  __Pyx_GIVEREF(__pyx_v_file);
  __Pyx_GOTREF(__pyx_v_self->file);
  __Pyx_DECREF(__pyx_v_self->file);
  __pyx_v_self->file = __pyx_v_file;

  /* "capnp/lib/capnp.pyx":3652
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 *         self.file = file
 *         self.schema = schema             # <<<<<<<<<<<<<<
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit
 */
  __Pyx_INCREF(__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_v_schema);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = __pyx_v_schema;

  /* "capnp/lib/capnp.pyx":3653
 *         self.file = file
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words             # <<<<<<<<<<<<<<
 *         self.nesting_limit = nesting_limit
 *         self.skip_copy = skip_copy
 */
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = __pyx_v_traversal_limit_in_words;

  /* "capnp/lib/capnp.pyx":3654
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit             # <<<<<<<<<<<<<<
 *         self.skip_copy = skip_copy
 * 
 */
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = __pyx_v_nesting_limit;

  /* "capnp/lib/capnp.pyx":3655
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit
 *         self.skip_copy = skip_copy             # <<<<<<<<<<<<<<
 * 
 *         self.stream = new schema_cpp.FdInputStream(file.fileno())
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_skip_copy); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3655, __pyx_L1_error)
  __pyx_v_self->skip_copy = __pyx_t_1;

  /* "capnp/lib/capnp.pyx":3657
 *         self.skip_copy = skip_copy
 * 
 *         self.stream = new schema_cpp.FdInputStream(file.fileno())             # <<<<<<<<<<<<<<
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(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);
    }
  }
  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->stream = new  ::kj::FdInputStream(__pyx_t_5);

  /* "capnp/lib/capnp.pyx":3658
 * 
 *         self.stream = new schema_cpp.FdInputStream(file.fileno())
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->buffered_stream = new  ::kj::BufferedInputStreamWrapper((*__pyx_v_self->stream));

  /* "capnp/lib/capnp.pyx":3650
 *     cdef public object traversal_limit_in_words, nesting_limit, schema, file
 * 
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         self.file = file
 *         self.schema = schema
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._MultiplePackedMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3660
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.stream
 *         del self.buffered_stream
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

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

static void __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3661
 * 
 *     def __dealloc__(self):
 *         del self.stream             # <<<<<<<<<<<<<<
 *         del self.buffered_stream
 * 
 */
  delete __pyx_v_self->stream;

  /* "capnp/lib/capnp.pyx":3662
 *     def __dealloc__(self):
 *         del self.stream
 *         del self.buffered_stream             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  delete __pyx_v_self->buffered_stream;

  /* "capnp/lib/capnp.pyx":3660
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.stream
 *         del self.buffered_stream
 */

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

/* "capnp/lib/capnp.pyx":3664
 *         del self.buffered_stream
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4__next__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4__next__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_v_reader = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_20_PackedMessageReader__init __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "capnp/lib/capnp.pyx":3665
 * 
 *     def __next__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":3666
 *     def __next__(self):
 *         try:
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)             # <<<<<<<<<<<<<<
 *             ret = reader.get_root(self.schema)
 *             if not self.skip_copy:
 */
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__PackedMessageReader)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3666, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_v_self->traversal_limit_in_words;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __pyx_v_self->nesting_limit;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8.__pyx_n = 3;
      __pyx_t_8.traversal_limit_in_words = __pyx_t_5;
      __pyx_t_8.nesting_limit = __pyx_t_6;
      __pyx_t_8.parent = ((PyObject *)__pyx_v_self);
      __pyx_t_7 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedMessageReader *)((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *)__pyx_t_4)->__pyx_base.__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *)__pyx_t_4), (*__pyx_v_self->buffered_stream), &__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3666, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_reader = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3667
 *         try:
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)             # <<<<<<<<<<<<<<
 *             if not self.skip_copy:
 *               ret = ret.as_builder().as_reader()
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_reader, __pyx_n_s_get_root); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3667, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_self->schema) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self->schema);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3667, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_ret = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3668
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 *             if not self.skip_copy:             # <<<<<<<<<<<<<<
 *               ret = ret.as_builder().as_reader()
 *             return ret
 */
      __pyx_t_9 = ((!(__pyx_v_self->skip_copy != 0)) != 0);
      if (__pyx_t_9) {

        /* "capnp/lib/capnp.pyx":3669
 *             ret = reader.get_root(self.schema)
 *             if not self.skip_copy:
 *               ret = ret.as_builder().as_reader()             # <<<<<<<<<<<<<<
 *             return ret
 *         except KjException as e:
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ret, __pyx_n_s_as_builder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3669, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3669, __pyx_L3_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_as_reader); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3669, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && 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 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3669, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "capnp/lib/capnp.pyx":3668
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 *             if not self.skip_copy:             # <<<<<<<<<<<<<<
 *               ret = ret.as_builder().as_reader()
 *             return ret
 */
      }

      /* "capnp/lib/capnp.pyx":3670
 *             if not self.skip_copy:
 *               ret = ret.as_builder().as_reader()
 *             return ret             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             if 'EOF' in str(e):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_ret);
      __pyx_r = __pyx_v_ret;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":3665
 * 
 *     def __next__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "capnp/lib/capnp.pyx":3671
 *               ret = ret.as_builder().as_reader()
 *             return ret
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             if 'EOF' in str(e):
 *                 raise StopIteration
 */
    __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_5, &__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_KjException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3671, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_ErrRestore(__pyx_t_7, __pyx_t_5, __pyx_t_6);
    __pyx_t_7 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    if (__pyx_t_10) {
      __Pyx_AddTraceback("capnp.lib.capnp._MultiplePackedMessageReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 3671, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;

      /* "capnp/lib/capnp.pyx":3672
 *             return ret
 *         except KjException as e:
 *             if 'EOF' in str(e):             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             else:
 */
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3672, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_EOF, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 3672, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = (__pyx_t_9 != 0);
      if (unlikely(__pyx_t_11)) {

        /* "capnp/lib/capnp.pyx":3673
 *         except KjException as e:
 *             if 'EOF' in str(e):
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *             else:
 *                 raise
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        __PYX_ERR(0, 3673, __pyx_L5_except_error)

        /* "capnp/lib/capnp.pyx":3672
 *             return ret
 *         except KjException as e:
 *             if 'EOF' in str(e):             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             else:
 */
      }

      /* "capnp/lib/capnp.pyx":3675
 *                 raise StopIteration
 *             else:
 *                 raise             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
      /*else*/ {
        __Pyx_GIVEREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_5, __pyx_t_7);
        __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0; 
        __PYX_ERR(0, 3675, __pyx_L5_except_error)
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":3665
 * 
 *     def __next__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             ret = reader.get_root(self.schema)
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":3664
 *         del self.buffered_stream
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("capnp.lib.capnp._MultiplePackedMessageReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_reader);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3677
 *                 raise
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_7__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_7__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6__iter__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6__iter__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "capnp/lib/capnp.pyx":3678
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 * cdef class _MultipleBytesMessageReader:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3677
 *                 raise
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "capnp/lib/capnp.pyx":3648
 *     cdef cbool skip_copy
 * 
 *     cdef public object traversal_limit_in_words, nesting_limit, schema, file             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, file, schema, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_r = __pyx_v_self->traversal_limit_in_words;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->nesting_limit);
  __pyx_r = __pyx_v_self->nesting_limit;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = Py_None;

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

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

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

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->schema);
  __pyx_r = __pyx_v_self->schema;
  goto __pyx_L0;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->file);
  __pyx_r = __pyx_v_self->file;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->file);
  __Pyx_DECREF(__pyx_v_self->file);
  __pyx_v_self->file = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->file);
  __Pyx_DECREF(__pyx_v_self->file);
  __pyx_v_self->file = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_8__reduce_cython__[] = "_MultiplePackedMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_8__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MultiplePackedMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_10__setstate_cython__[] = "_MultiplePackedMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_10__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MultiplePackedMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3686
 *     cdef public object traversal_limit_in_words, nesting_limit, schema
 * 
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         self.offset = 0
 *         self.schema = schema
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 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_buf,&__pyx_n_s_schema,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 3686, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3686, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_buf = values[0];
    __pyx_v_schema = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3686, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self), __pyx_v_buf, __pyx_v_schema, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_schema, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_aligned = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__pyx_v_view = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  char const *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3687
 * 
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):
 *         self.offset = 0             # <<<<<<<<<<<<<<
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words
 */
  __pyx_v_self->offset = 0;

  /* "capnp/lib/capnp.pyx":3688
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):
 *         self.offset = 0
 *         self.schema = schema             # <<<<<<<<<<<<<<
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit
 */
  __Pyx_INCREF(__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_v_schema);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = __pyx_v_schema;

  /* "capnp/lib/capnp.pyx":3689
 *         self.offset = 0
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words             # <<<<<<<<<<<<<<
 *         self.nesting_limit = nesting_limit
 * 
 */
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = __pyx_v_traversal_limit_in_words;

  /* "capnp/lib/capnp.pyx":3690
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit             # <<<<<<<<<<<<<<
 * 
 *         self.sz = len(buf)
 */
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = __pyx_v_nesting_limit;

  /* "capnp/lib/capnp.pyx":3692
 *         self.nesting_limit = nesting_limit
 * 
 *         self.sz = len(buf)             # <<<<<<<<<<<<<<
 *         if isinstance(buf, bytes):
 *             self.ptr = buf
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_buf); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3692, __pyx_L1_error)
  __pyx_v_self->sz = __pyx_t_1;

  /* "capnp/lib/capnp.pyx":3693
 * 
 *         self.sz = len(buf)
 *         if isinstance(buf, bytes):             # <<<<<<<<<<<<<<
 *             self.ptr = buf
 *             if (<uintptr_t>self.ptr) % 8 != 0:
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_buf); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":3694
 *         self.sz = len(buf)
 *         if isinstance(buf, bytes):
 *             self.ptr = buf             # <<<<<<<<<<<<<<
 *             if (<uintptr_t>self.ptr) % 8 != 0:
 *                 aligned = _AlignedBuffer(buf)
 */
    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_buf); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 3694, __pyx_L1_error)
    __pyx_v_self->ptr = __pyx_t_4;

    /* "capnp/lib/capnp.pyx":3695
 *         if isinstance(buf, bytes):
 *             self.ptr = buf
 *             if (<uintptr_t>self.ptr) % 8 != 0:             # <<<<<<<<<<<<<<
 *                 aligned = _AlignedBuffer(buf)
 *                 self.ptr = aligned.buf
 */
    __pyx_t_3 = (((((uintptr_t)__pyx_v_self->ptr) % 8) != 0) != 0);
    if (__pyx_t_3) {

      /* "capnp/lib/capnp.pyx":3696
 *             self.ptr = buf
 *             if (<uintptr_t>self.ptr) % 8 != 0:
 *                 aligned = _AlignedBuffer(buf)             # <<<<<<<<<<<<<<
 *                 self.ptr = aligned.buf
 *                 self._object_to_pin = aligned
 */
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__AlignedBuffer), __pyx_v_buf); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3696, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_aligned = ((struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "capnp/lib/capnp.pyx":3697
 *             if (<uintptr_t>self.ptr) % 8 != 0:
 *                 aligned = _AlignedBuffer(buf)
 *                 self.ptr = aligned.buf             # <<<<<<<<<<<<<<
 *                 self._object_to_pin = aligned
 *             else:
 */
      __pyx_t_6 = __pyx_v_aligned->buf;
      __pyx_v_self->ptr = __pyx_t_6;

      /* "capnp/lib/capnp.pyx":3698
 *                 aligned = _AlignedBuffer(buf)
 *                 self.ptr = aligned.buf
 *                 self._object_to_pin = aligned             # <<<<<<<<<<<<<<
 *             else:
 *                 self._object_to_pin = buf
 */
      __Pyx_INCREF(((PyObject *)__pyx_v_aligned));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_aligned));
      __Pyx_GOTREF(__pyx_v_self->_object_to_pin);
      __Pyx_DECREF(__pyx_v_self->_object_to_pin);
      __pyx_v_self->_object_to_pin = ((PyObject *)__pyx_v_aligned);

      /* "capnp/lib/capnp.pyx":3695
 *         if isinstance(buf, bytes):
 *             self.ptr = buf
 *             if (<uintptr_t>self.ptr) % 8 != 0:             # <<<<<<<<<<<<<<
 *                 aligned = _AlignedBuffer(buf)
 *                 self.ptr = aligned.buf
 */
      goto __pyx_L4;
    }

    /* "capnp/lib/capnp.pyx":3700
 *                 self._object_to_pin = aligned
 *             else:
 *                 self._object_to_pin = buf             # <<<<<<<<<<<<<<
 *                 self.ptr = buf
 *         elif PyObject_CheckBuffer(buf):
 */
    /*else*/ {
      __Pyx_INCREF(__pyx_v_buf);
      __Pyx_GIVEREF(__pyx_v_buf);
      __Pyx_GOTREF(__pyx_v_self->_object_to_pin);
      __Pyx_DECREF(__pyx_v_self->_object_to_pin);
      __pyx_v_self->_object_to_pin = __pyx_v_buf;

      /* "capnp/lib/capnp.pyx":3701
 *             else:
 *                 self._object_to_pin = buf
 *                 self.ptr = buf             # <<<<<<<<<<<<<<
 *         elif PyObject_CheckBuffer(buf):
 *             view = _BufferView(buf)
 */
      __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_buf); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 3701, __pyx_L1_error)
      __pyx_v_self->ptr = __pyx_t_4;
    }
    __pyx_L4:;

    /* "capnp/lib/capnp.pyx":3693
 * 
 *         self.sz = len(buf)
 *         if isinstance(buf, bytes):             # <<<<<<<<<<<<<<
 *             self.ptr = buf
 *             if (<uintptr_t>self.ptr) % 8 != 0:
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":3702
 *                 self._object_to_pin = buf
 *                 self.ptr = buf
 *         elif PyObject_CheckBuffer(buf):             # <<<<<<<<<<<<<<
 *             view = _BufferView(buf)
 *             self.ptr = view.buf
 */
  __pyx_t_3 = (PyObject_CheckBuffer(__pyx_v_buf) != 0);
  if (likely(__pyx_t_3)) {

    /* "capnp/lib/capnp.pyx":3703
 *                 self.ptr = buf
 *         elif PyObject_CheckBuffer(buf):
 *             view = _BufferView(buf)             # <<<<<<<<<<<<<<
 *             self.ptr = view.buf
 *             self._object_to_pin = view
 */
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__BufferView), __pyx_v_buf); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_view = ((struct __pyx_obj_5capnp_3lib_5capnp__BufferView *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "capnp/lib/capnp.pyx":3704
 *         elif PyObject_CheckBuffer(buf):
 *             view = _BufferView(buf)
 *             self.ptr = view.buf             # <<<<<<<<<<<<<<
 *             self._object_to_pin = view
 *         else:
 */
    __pyx_t_6 = __pyx_v_view->buf;
    __pyx_v_self->ptr = __pyx_t_6;

    /* "capnp/lib/capnp.pyx":3705
 *             view = _BufferView(buf)
 *             self.ptr = view.buf
 *             self._object_to_pin = view             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('expected buffer-like object in FlatArrayMessageReader')
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_view));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_view));
    __Pyx_GOTREF(__pyx_v_self->_object_to_pin);
    __Pyx_DECREF(__pyx_v_self->_object_to_pin);
    __pyx_v_self->_object_to_pin = ((PyObject *)__pyx_v_view);

    /* "capnp/lib/capnp.pyx":3702
 *                 self._object_to_pin = buf
 *                 self.ptr = buf
 *         elif PyObject_CheckBuffer(buf):             # <<<<<<<<<<<<<<
 *             view = _BufferView(buf)
 *             self.ptr = view.buf
 */
    goto __pyx_L3;
  }

  /* "capnp/lib/capnp.pyx":3707
 *             self._object_to_pin = view
 *         else:
 *             raise TypeError('expected buffer-like object in FlatArrayMessageReader')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 3707, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "capnp/lib/capnp.pyx":3686
 *     cdef public object traversal_limit_in_words, nesting_limit, schema
 * 
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         self.offset = 0
 *         self.schema = schema
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_aligned);
  __Pyx_XDECREF((PyObject *)__pyx_v_view);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3710
 * 
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef _FlatArrayMessageReaderAligned reader
 *         if self.offset == self.sz:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_3__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_3__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_2__next__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_2__next__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self) {
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_reader = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "capnp/lib/capnp.pyx":3712
 *     def __next__(self):
 *         cdef _FlatArrayMessageReaderAligned reader
 *         if self.offset == self.sz:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         try:
 */
  __pyx_t_1 = ((__pyx_v_self->offset == __pyx_v_self->sz) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":3713
 *         cdef _FlatArrayMessageReaderAligned reader
 *         if self.offset == self.sz:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         try:
 *             reader = _FlatArrayMessageReaderAligned()
 */
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(0, 3713, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3712
 *     def __next__(self):
 *         cdef _FlatArrayMessageReaderAligned reader
 *         if self.offset == self.sz:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         try:
 */
  }

  /* "capnp/lib/capnp.pyx":3714
 *         if self.offset == self.sz:
 *             raise StopIteration
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _FlatArrayMessageReaderAligned()
 *             reader._init(self._object_to_pin, self.ptr + self.offset, self.sz - self.offset, self.traversal_limit_in_words, self.nesting_limit)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "capnp/lib/capnp.pyx":3715
 *             raise StopIteration
 *         try:
 *             reader = _FlatArrayMessageReaderAligned()             # <<<<<<<<<<<<<<
 *             reader._init(self._object_to_pin, self.ptr + self.offset, self.sz - self.offset, self.traversal_limit_in_words, self.nesting_limit)
 *             self.offset += reader.msg_size
 */
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3715, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_reader = ((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "capnp/lib/capnp.pyx":3716
 *         try:
 *             reader = _FlatArrayMessageReaderAligned()
 *             reader._init(self._object_to_pin, self.ptr + self.offset, self.sz - self.offset, self.traversal_limit_in_words, self.nesting_limit)             # <<<<<<<<<<<<<<
 *             self.offset += reader.msg_size
 *             return reader.get_root(self.schema)
 */
      __pyx_t_5 = __pyx_v_self->_object_to_pin;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __pyx_v_self->traversal_limit_in_words;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = __pyx_v_self->nesting_limit;
      __Pyx_INCREF(__pyx_t_7);
      __pyx_t_9.__pyx_n = 2;
      __pyx_t_9.traversal_limit_in_words = __pyx_t_6;
      __pyx_t_9.nesting_limit = __pyx_t_7;
      __pyx_t_8 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)__pyx_v_reader->__pyx_base.__pyx_vtab)->_init(__pyx_v_reader, __pyx_t_5, (__pyx_v_self->ptr + __pyx_v_self->offset), (__pyx_v_self->sz - __pyx_v_self->offset), &__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3716, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "capnp/lib/capnp.pyx":3717
 *             reader = _FlatArrayMessageReaderAligned()
 *             reader._init(self._object_to_pin, self.ptr + self.offset, self.sz - self.offset, self.traversal_limit_in_words, self.nesting_limit)
 *             self.offset += reader.msg_size             # <<<<<<<<<<<<<<
 *             return reader.get_root(self.schema)
 *         except KjException as e:
 */
      __pyx_v_self->offset = (__pyx_v_self->offset + __pyx_v_reader->msg_size);

      /* "capnp/lib/capnp.pyx":3718
 *             reader._init(self._object_to_pin, self.ptr + self.offset, self.sz - self.offset, self.traversal_limit_in_words, self.nesting_limit)
 *             self.offset += reader.msg_size
 *             return reader.get_root(self.schema)             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             if 'EOF' in str(e):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = __pyx_v_self->schema;
      __Pyx_INCREF(__pyx_t_8);
      try {
        __pyx_t_7 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)__pyx_v_reader->__pyx_base.__pyx_vtab)->__pyx_base.get_root(((struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)__pyx_v_reader), __pyx_t_8, 0);
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3718, __pyx_L4_error)
      } catch(...) {
        reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
        __PYX_ERR(0, 3718, __pyx_L4_error)
      }
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L8_try_return;

      /* "capnp/lib/capnp.pyx":3714
 *         if self.offset == self.sz:
 *             raise StopIteration
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _FlatArrayMessageReaderAligned()
 *             reader._init(self._object_to_pin, self.ptr + self.offset, self.sz - self.offset, self.traversal_limit_in_words, self.nesting_limit)
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "capnp/lib/capnp.pyx":3719
 *             self.offset += reader.msg_size
 *             return reader.get_root(self.schema)
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             if 'EOF' in str(e):
 *                 raise StopIteration
 */
    __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_KjException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3719, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_6);
    __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_6 = 0;
    if (__pyx_t_10) {
      __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesMessageReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 3719, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_e = __pyx_t_8;

      /* "capnp/lib/capnp.pyx":3720
 *             return reader.get_root(self.schema)
 *         except KjException as e:
 *             if 'EOF' in str(e):             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             else:
 */
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3720, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_EOF, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3720, __pyx_L6_except_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = (__pyx_t_1 != 0);
      if (unlikely(__pyx_t_11)) {

        /* "capnp/lib/capnp.pyx":3721
 *         except KjException as e:
 *             if 'EOF' in str(e):
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *             else:
 *                 raise
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        __PYX_ERR(0, 3721, __pyx_L6_except_error)

        /* "capnp/lib/capnp.pyx":3720
 *             return reader.get_root(self.schema)
 *         except KjException as e:
 *             if 'EOF' in str(e):             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             else:
 */
      }

      /* "capnp/lib/capnp.pyx":3723
 *                 raise StopIteration
 *             else:
 *                 raise             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
      /*else*/ {
        __Pyx_GIVEREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_8, __pyx_t_7);
        __pyx_t_6 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; 
        __PYX_ERR(0, 3723, __pyx_L6_except_error)
      }
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "capnp/lib/capnp.pyx":3714
 *         if self.offset == self.sz:
 *             raise StopIteration
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _FlatArrayMessageReaderAligned()
 *             reader._init(self._object_to_pin, self.ptr + self.offset, self.sz - self.offset, self.traversal_limit_in_words, self.nesting_limit)
 */
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":3710
 * 
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         cdef _FlatArrayMessageReaderAligned reader
 *         if self.offset == self.sz:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesMessageReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reader);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3725
 *                 raise
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_5__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_5__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_4__iter__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_4__iter__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "capnp/lib/capnp.pyx":3726
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 * cdef class _MultipleBytesPackedMessageReader:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3725
 *                 raise
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3684
 *     cdef const char *ptr
 *     cdef object _object_to_pin
 *     cdef public object traversal_limit_in_words, nesting_limit, schema             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_r = __pyx_v_self->traversal_limit_in_words;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->nesting_limit);
  __pyx_r = __pyx_v_self->nesting_limit;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->schema);
  __pyx_r = __pyx_v_self->schema;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6__reduce_cython__[] = "_MultipleBytesMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6__reduce_cython__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  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_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._object_to_pin, self.nesting_limit, self.offset, self.ptr, self.schema, self.sz, self.traversal_limit_in_words)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyStr_FromString(__pyx_v_self->ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_self->sz); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self->_object_to_pin);
  __Pyx_GIVEREF(__pyx_v_self->_object_to_pin);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->_object_to_pin);
  __Pyx_INCREF(__pyx_v_self->nesting_limit);
  __Pyx_GIVEREF(__pyx_v_self->nesting_limit);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->nesting_limit);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_self->schema);
  __Pyx_GIVEREF(__pyx_v_self->schema);
  PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->schema);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_self->traversal_limit_in_words);
  PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_self->traversal_limit_in_words);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._object_to_pin, self.nesting_limit, self.offset, self.ptr, self.schema, self.sz, self.traversal_limit_in_words)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v__dict = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":7
 *     state = (self._object_to_pin, self.nesting_limit, self.offset, self.ptr, self.schema, self.sz, self.traversal_limit_in_words)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_5 = (__pyx_v__dict != Py_None);
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict);
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._object_to_pin is not None or self.nesting_limit is not None or self.schema is not None or self.traversal_limit_in_words is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._object_to_pin, self.nesting_limit, self.offset, self.ptr, self.schema, self.sz, self.traversal_limit_in_words)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._object_to_pin is not None or self.nesting_limit is not None or self.schema is not None or self.traversal_limit_in_words is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->_object_to_pin != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->nesting_limit != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    if (!__pyx_t_5) {
    } else {
      __pyx_t_6 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->schema != Py_None);
    __pyx_t_7 = (__pyx_t_5 != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_7 = (__pyx_v_self->traversal_limit_in_words != Py_None);
    __pyx_t_5 = (__pyx_t_7 != 0);
    __pyx_t_6 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_6;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._object_to_pin is not None or self.nesting_limit is not None or self.schema is not None or self.traversal_limit_in_words is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, None), state
 *     else:
 */
  __pyx_t_6 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":13
 *         use_setstate = self._object_to_pin is not None or self.nesting_limit is not None or self.schema is not None or self.traversal_limit_in_words is not None
 *     if use_setstate:
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle__MultipleBytesMes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_182503194);
    __Pyx_GIVEREF(__pyx_int_182503194);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_182503194);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._object_to_pin is not None or self.nesting_limit is not None or self.schema is not None or self.traversal_limit_in_words is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, None), state
 *     else:
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__MultipleBytesMessageReader__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle__MultipleBytesMes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_182503194);
    __Pyx_GIVEREF(__pyx_int_182503194);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_182503194);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
    __pyx_t_2 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* 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("capnp.lib.capnp._MultipleBytesMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__MultipleBytesMessageReader__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_8__setstate_cython__[] = "_MultipleBytesMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_8__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_8__setstate_cython__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle__MultipleBytesMessageReader__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__MultipleBytesMessageReader__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle__MultipleBytesMessageReader, (type(self), 0xae0c71a, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle__MultipleBytesMessageReader__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3735
 *     cdef public object traversal_limit_in_words, nesting_limit, schema, buf
 * 
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_schema = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 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_buf,&__pyx_n_s_schema,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 3735, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3735, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_buf = values[0];
    __pyx_v_schema = values[1];
    __pyx_v_traversal_limit_in_words = values[2];
    __pyx_v_nesting_limit = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3735, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesPackedMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self), __pyx_v_buf, __pyx_v_schema, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_schema, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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("__init__", 0);

  /* "capnp/lib/capnp.pyx":3736
 * 
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):
 *         self.schema = schema             # <<<<<<<<<<<<<<
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit
 */
  __Pyx_INCREF(__pyx_v_schema);
  __Pyx_GIVEREF(__pyx_v_schema);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = __pyx_v_schema;

  /* "capnp/lib/capnp.pyx":3737
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words             # <<<<<<<<<<<<<<
 *         self.nesting_limit = nesting_limit
 * 
 */
  __Pyx_INCREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GIVEREF(__pyx_v_traversal_limit_in_words);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = __pyx_v_traversal_limit_in_words;

  /* "capnp/lib/capnp.pyx":3738
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words
 *         self.nesting_limit = nesting_limit             # <<<<<<<<<<<<<<
 * 
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_SIMPLE) != 0:
 */
  __Pyx_INCREF(__pyx_v_nesting_limit);
  __Pyx_GIVEREF(__pyx_v_nesting_limit);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = __pyx_v_nesting_limit;

  /* "capnp/lib/capnp.pyx":3740
 *         self.nesting_limit = nesting_limit
 * 
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_SIMPLE) != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("could not get read buffer")
 * 
 */
  __pyx_t_1 = ((PyObject_GetBuffer(__pyx_v_buf, (&__pyx_v_self->view), PyBUF_SIMPLE) != 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":3741
 * 
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_SIMPLE) != 0:
 *             raise KjException("could not get read buffer")             # <<<<<<<<<<<<<<
 * 
 *         self.buf = buf
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_could_not_get_read_buffer) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_could_not_get_read_buffer);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3741, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3741, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3740
 *         self.nesting_limit = nesting_limit
 * 
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_SIMPLE) != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("could not get read buffer")
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":3743
 *             raise KjException("could not get read buffer")
 * 
 *         self.buf = buf             # <<<<<<<<<<<<<<
 *         self.stream = new schema_cpp.ArrayInputStream(schema_cpp.ByteArrayPtr(<byte *>self.view.buf, self.view.len))
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 */
  __Pyx_INCREF(__pyx_v_buf);
  __Pyx_GIVEREF(__pyx_v_buf);
  __Pyx_GOTREF(__pyx_v_self->buf);
  __Pyx_DECREF(__pyx_v_self->buf);
  __pyx_v_self->buf = __pyx_v_buf;

  /* "capnp/lib/capnp.pyx":3744
 * 
 *         self.buf = buf
 *         self.stream = new schema_cpp.ArrayInputStream(schema_cpp.ByteArrayPtr(<byte *>self.view.buf, self.view.len))             # <<<<<<<<<<<<<<
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 * 
 */
  __pyx_v_self->stream = new  ::kj::ArrayInputStream( ::kj::ArrayPtr< ::capnp::byte>(((__pyx_t_5capnp_8includes_5types_byte *)__pyx_v_self->view.buf), __pyx_v_self->view.len));

  /* "capnp/lib/capnp.pyx":3745
 *         self.buf = buf
 *         self.stream = new schema_cpp.ArrayInputStream(schema_cpp.ByteArrayPtr(<byte *>self.view.buf, self.view.len))
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->buffered_stream = new  ::kj::BufferedInputStreamWrapper((*__pyx_v_self->stream));

  /* "capnp/lib/capnp.pyx":3735
 *     cdef public object traversal_limit_in_words, nesting_limit, schema, buf
 * 
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 *         self.traversal_limit_in_words = traversal_limit_in_words
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesPackedMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3747
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyBuffer_Release(&self.view)
 *         del self.buffered_stream
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3748
 * 
 *     def __dealloc__(self):
 *         PyBuffer_Release(&self.view)             # <<<<<<<<<<<<<<
 *         del self.buffered_stream
 *         del self.stream
 */
  PyBuffer_Release((&__pyx_v_self->view));

  /* "capnp/lib/capnp.pyx":3749
 *     def __dealloc__(self):
 *         PyBuffer_Release(&self.view)
 *         del self.buffered_stream             # <<<<<<<<<<<<<<
 *         del self.stream
 * 
 */
  delete __pyx_v_self->buffered_stream;

  /* "capnp/lib/capnp.pyx":3750
 *         PyBuffer_Release(&self.view)
 *         del self.buffered_stream
 *         del self.stream             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  delete __pyx_v_self->stream;

  /* "capnp/lib/capnp.pyx":3747
 *         self.buffered_stream = new schema_cpp.BufferedInputStreamWrapper(deref(self.stream))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyBuffer_Release(&self.view)
 *         del self.buffered_stream
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "capnp/lib/capnp.pyx":3752
 *         del self.stream
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_5__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_5__next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_4__next__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_4__next__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_v_reader = NULL;
  PyObject *__pyx_v_e = 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;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_5capnp_3lib_5capnp_20_PackedMessageReader__init __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "capnp/lib/capnp.pyx":3753
 * 
 *     def __next__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             return reader.get_root(self.schema)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "capnp/lib/capnp.pyx":3754
 *     def __next__(self):
 *         try:
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)             # <<<<<<<<<<<<<<
 *             return reader.get_root(self.schema)
 *         except KjException as e:
 */
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__PackedMessageReader)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3754, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_v_self->traversal_limit_in_words;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = __pyx_v_self->nesting_limit;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8.__pyx_n = 3;
      __pyx_t_8.traversal_limit_in_words = __pyx_t_5;
      __pyx_t_8.nesting_limit = __pyx_t_6;
      __pyx_t_8.parent = ((PyObject *)__pyx_v_self);
      __pyx_t_7 = ((struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedMessageReader *)((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *)__pyx_t_4)->__pyx_base.__pyx_vtab)->_init(((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *)__pyx_t_4), (*__pyx_v_self->buffered_stream), &__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3754, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_reader = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "capnp/lib/capnp.pyx":3755
 *         try:
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             return reader.get_root(self.schema)             # <<<<<<<<<<<<<<
 *         except KjException as e:
 *             if 'EOF' in str(e):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_reader, __pyx_n_s_get_root); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3755, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_self->schema) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self->schema);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3755, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L7_try_return;

      /* "capnp/lib/capnp.pyx":3753
 * 
 *     def __next__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             return reader.get_root(self.schema)
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "capnp/lib/capnp.pyx":3756
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             return reader.get_root(self.schema)
 *         except KjException as e:             # <<<<<<<<<<<<<<
 *             if 'EOF' in str(e):
 *                 raise StopIteration
 */
    __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_KjException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3756, __pyx_L5_except_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
    __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
    if (__pyx_t_9) {
      __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesPackedMessageReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 3756, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_e = __pyx_t_6;

      /* "capnp/lib/capnp.pyx":3757
 *             return reader.get_root(self.schema)
 *         except KjException as e:
 *             if 'EOF' in str(e):             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             else:
 */
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3757, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_EOF, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 3757, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = (__pyx_t_10 != 0);
      if (unlikely(__pyx_t_11)) {

        /* "capnp/lib/capnp.pyx":3758
 *         except KjException as e:
 *             if 'EOF' in str(e):
 *                 raise StopIteration             # <<<<<<<<<<<<<<
 *             else:
 *                 raise
 */
        __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
        __PYX_ERR(0, 3758, __pyx_L5_except_error)

        /* "capnp/lib/capnp.pyx":3757
 *             return reader.get_root(self.schema)
 *         except KjException as e:
 *             if 'EOF' in str(e):             # <<<<<<<<<<<<<<
 *                 raise StopIteration
 *             else:
 */
      }

      /* "capnp/lib/capnp.pyx":3760
 *                 raise StopIteration
 *             else:
 *                 raise             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
      /*else*/ {
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_6, __pyx_t_7);
        __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; 
        __PYX_ERR(0, 3760, __pyx_L5_except_error)
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "capnp/lib/capnp.pyx":3753
 * 
 *     def __next__(self):
 *         try:             # <<<<<<<<<<<<<<
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 *             return reader.get_root(self.schema)
 */
    __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_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "capnp/lib/capnp.pyx":3752
 *         del self.stream
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         try:
 *             reader = _PackedMessageReader()._init(deref(self.buffered_stream), self.traversal_limit_in_words, self.nesting_limit, self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesPackedMessageReader.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_reader);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3762
 *                 raise
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_7__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_7__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6__iter__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6__iter__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "capnp/lib/capnp.pyx":3763
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 * @cython.internal
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3762
 *                 raise
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3733
 *     cdef Py_buffer view
 * 
 *     cdef public object traversal_limit_in_words, nesting_limit, schema, buf             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, buf, schema, traversal_limit_in_words = None, nesting_limit = None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_r = __pyx_v_self->traversal_limit_in_words;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v_self->traversal_limit_in_words);
  __pyx_v_self->traversal_limit_in_words = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->nesting_limit);
  __pyx_r = __pyx_v_self->nesting_limit;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->nesting_limit);
  __Pyx_DECREF(__pyx_v_self->nesting_limit);
  __pyx_v_self->nesting_limit = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->schema);
  __pyx_r = __pyx_v_self->schema;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->schema);
  __Pyx_DECREF(__pyx_v_self->schema);
  __pyx_v_self->schema = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf___get__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf___get__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->buf);
  __pyx_r = __pyx_v_self->buf;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_2__set__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_2__set__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->buf);
  __Pyx_DECREF(__pyx_v_self->buf);
  __pyx_v_self->buf = __pyx_v_value;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_4__del__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_4__del__(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->buf);
  __Pyx_DECREF(__pyx_v_self->buf);
  __pyx_v_self->buf = Py_None;

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_8__reduce_cython__[] = "_MultipleBytesPackedMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_8__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesPackedMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_10__setstate_cython__[] = "_MultipleBytesPackedMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_10__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__117, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._MultipleBytesPackedMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3772
 * 
 *     # other should also have a length that's a multiple of 8
 *     def __init__(self, other):             # <<<<<<<<<<<<<<
 *         if PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE) != 0:
 *             raise KjException("could not get read buffer")
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_other = 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_other,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3772, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_other = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3772, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._AlignedBuffer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer___init__(((struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *)__pyx_v_self), __pyx_v_other);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer___init__(struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_self, PyObject *__pyx_v_other) {
  Py_ssize_t __pyx_v_other_len;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3773
 *     # other should also have a length that's a multiple of 8
 *     def __init__(self, other):
 *         if PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE) != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("could not get read buffer")
 *         other_len = len(other)
 */
  __pyx_t_1 = ((PyObject_GetBuffer(__pyx_v_other, (&__pyx_v_self->view), PyBUF_SIMPLE) != 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":3774
 *     def __init__(self, other):
 *         if PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE) != 0:
 *             raise KjException("could not get read buffer")             # <<<<<<<<<<<<<<
 *         other_len = len(other)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_could_not_get_read_buffer) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_could_not_get_read_buffer);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3774, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3774, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3773
 *     # other should also have a length that's a multiple of 8
 *     def __init__(self, other):
 *         if PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE) != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("could not get read buffer")
 *         other_len = len(other)
 */
  }

  /* "capnp/lib/capnp.pyx":3775
 *         if PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE) != 0:
 *             raise KjException("could not get read buffer")
 *         other_len = len(other)             # <<<<<<<<<<<<<<
 * 
 *         # malloc is defined as being word aligned
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_other); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3775, __pyx_L1_error)
  __pyx_v_other_len = __pyx_t_5;

  /* "capnp/lib/capnp.pyx":3779
 *         # malloc is defined as being word aligned
 *         # we don't care about adding NULL terminating character
 *         self.buf = <char *>malloc(other_len)             # <<<<<<<<<<<<<<
 *         memcpy(self.buf, self.view.buf, other_len)
 *         self.allocated = True
 */
  __pyx_v_self->buf = ((char *)malloc(__pyx_v_other_len));

  /* "capnp/lib/capnp.pyx":3780
 *         # we don't care about adding NULL terminating character
 *         self.buf = <char *>malloc(other_len)
 *         memcpy(self.buf, self.view.buf, other_len)             # <<<<<<<<<<<<<<
 *         self.allocated = True
 * 
 */
  (void)(memcpy(__pyx_v_self->buf, __pyx_v_self->view.buf, __pyx_v_other_len));

  /* "capnp/lib/capnp.pyx":3781
 *         self.buf = <char *>malloc(other_len)
 *         memcpy(self.buf, self.view.buf, other_len)
 *         self.allocated = True             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->allocated = 1;

  /* "capnp/lib/capnp.pyx":3772
 * 
 *     # other should also have a length that's a multiple of 8
 *     def __init__(self, other):             # <<<<<<<<<<<<<<
 *         if PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE) != 0:
 *             raise KjException("could not get read buffer")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._AlignedBuffer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3783
 *         self.allocated = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.allocated:
 *             free(self.buf)
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3784
 * 
 *     def __dealloc__(self):
 *         if self.allocated:             # <<<<<<<<<<<<<<
 *             free(self.buf)
 *         PyBuffer_Release(&self.view)
 */
  __pyx_t_1 = (__pyx_v_self->allocated != 0);
  if (__pyx_t_1) {

    /* "capnp/lib/capnp.pyx":3785
 *     def __dealloc__(self):
 *         if self.allocated:
 *             free(self.buf)             # <<<<<<<<<<<<<<
 *         PyBuffer_Release(&self.view)
 * 
 */
    free(__pyx_v_self->buf);

    /* "capnp/lib/capnp.pyx":3784
 * 
 *     def __dealloc__(self):
 *         if self.allocated:             # <<<<<<<<<<<<<<
 *             free(self.buf)
 *         PyBuffer_Release(&self.view)
 */
  }

  /* "capnp/lib/capnp.pyx":3786
 *         if self.allocated:
 *             free(self.buf)
 *         PyBuffer_Release(&self.view)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  PyBuffer_Release((&__pyx_v_self->view));

  /* "capnp/lib/capnp.pyx":3783
 *         self.allocated = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.allocated:
 *             free(self.buf)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_AlignedBuffer_4__reduce_cython__[] = "_AlignedBuffer.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._AlignedBuffer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_14_AlignedBuffer_6__setstate_cython__[] = "_AlignedBuffer.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_14_AlignedBuffer_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._AlignedBuffer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3794
 *     cdef char * buf
 * 
 *     def __init__(self, other):             # <<<<<<<<<<<<<<
 *         cdef int ret = PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE)
 *         if ret < 0:
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_11_BufferView_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_11_BufferView_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_other = 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_other,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3794, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_other = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3794, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._BufferView.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_BufferView___init__(((struct __pyx_obj_5capnp_3lib_5capnp__BufferView *)__pyx_v_self), __pyx_v_other);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_11_BufferView___init__(struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_v_ret;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3795
 * 
 *     def __init__(self, other):
 *         cdef int ret = PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE)             # <<<<<<<<<<<<<<
 *         if ret < 0:
 *           raise ValueError("Invalid buffer passed to BufferView")
 */
  __pyx_v_ret = PyObject_GetBuffer(__pyx_v_other, (&__pyx_v_self->view), PyBUF_SIMPLE);

  /* "capnp/lib/capnp.pyx":3796
 *     def __init__(self, other):
 *         cdef int ret = PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *           raise ValueError("Invalid buffer passed to BufferView")
 *         self.buf = <char*>self.view.buf
 */
  __pyx_t_1 = ((__pyx_v_ret < 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":3797
 *         cdef int ret = PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE)
 *         if ret < 0:
 *           raise ValueError("Invalid buffer passed to BufferView")             # <<<<<<<<<<<<<<
 *         self.buf = <char*>self.view.buf
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3797, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3796
 *     def __init__(self, other):
 *         cdef int ret = PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE)
 *         if ret < 0:             # <<<<<<<<<<<<<<
 *           raise ValueError("Invalid buffer passed to BufferView")
 *         self.buf = <char*>self.view.buf
 */
  }

  /* "capnp/lib/capnp.pyx":3798
 *         if ret < 0:
 *           raise ValueError("Invalid buffer passed to BufferView")
 *         self.buf = <char*>self.view.buf             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->buf = ((char *)__pyx_v_self->view.buf);

  /* "capnp/lib/capnp.pyx":3794
 *     cdef char * buf
 * 
 *     def __init__(self, other):             # <<<<<<<<<<<<<<
 *         cdef int ret = PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE)
 *         if ret < 0:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("capnp.lib.capnp._BufferView.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3800
 *         self.buf = <char*>self.view.buf
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyBuffer_Release(&self.view)
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_11_BufferView_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_11_BufferView_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_11_BufferView_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__BufferView *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5capnp_3lib_5capnp_11_BufferView_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3801
 * 
 *     def __dealloc__(self):
 *         PyBuffer_Release(&self.view)             # <<<<<<<<<<<<<<
 * 
 * @cython.internal
 */
  PyBuffer_Release((&__pyx_v_self->view));

  /* "capnp/lib/capnp.pyx":3800
 *         self.buf = <char*>self.view.buf
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyBuffer_Release(&self.view)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_BufferView_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_BufferView_4__reduce_cython__[] = "_BufferView.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_BufferView_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_BufferView_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__BufferView *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_BufferView_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._BufferView.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_BufferView_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_11_BufferView_6__setstate_cython__[] = "_BufferView.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_11_BufferView_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_11_BufferView_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__BufferView *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_11_BufferView_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__122, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._BufferView.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3813
 *     cdef object _object_to_pin
 *     cdef Py_ssize_t msg_size
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.msg_size = 0
 * 
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned___init__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned___init__(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3814
 *     cdef Py_ssize_t msg_size
 *     def __init__(self):
 *         self.msg_size = 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->msg_size = 0;

  /* "capnp/lib/capnp.pyx":3813
 *     cdef object _object_to_pin
 *     cdef Py_ssize_t msg_size
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.msg_size = 0
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3817
 * 
 * 
 *     cdef _init(self, buf, const char *ptr, Py_ssize_t sz, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         cdef schema_cpp.FlatArrayMessageReader * flat_reader
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_self, PyObject *__pyx_v_buf, char const *__pyx_v_ptr, Py_ssize_t __pyx_v_sz, struct __pyx_opt_args_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init *__pyx_optional_args) {
  PyObject *__pyx_v_traversal_limit_in_words = ((PyObject *)Py_None);
  PyObject *__pyx_v_nesting_limit = ((PyObject *)Py_None);
   ::capnp::ReaderOptions __pyx_v_opts;
   ::capnp::FlatArrayMessageReader *__pyx_v_flat_reader;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
   ::capnp::FlatArrayMessageReader *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_traversal_limit_in_words = __pyx_optional_args->traversal_limit_in_words;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_nesting_limit = __pyx_optional_args->nesting_limit;
      }
    }
  }

  /* "capnp/lib/capnp.pyx":3818
 * 
 *     cdef _init(self, buf, const char *ptr, Py_ssize_t sz, traversal_limit_in_words = None, nesting_limit = None):
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.FlatArrayMessageReader * flat_reader
 * 
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":3821
 *         cdef schema_cpp.FlatArrayMessageReader * flat_reader
 * 
 *         self._object_to_pin = buf             # <<<<<<<<<<<<<<
 * 
 *         flat_reader = new schema_cpp.FlatArrayMessageReader(
 */
  __Pyx_INCREF(__pyx_v_buf);
  __Pyx_GIVEREF(__pyx_v_buf);
  __Pyx_GOTREF(__pyx_v_self->_object_to_pin);
  __Pyx_DECREF(__pyx_v_self->_object_to_pin);
  __pyx_v_self->_object_to_pin = __pyx_v_buf;

  /* "capnp/lib/capnp.pyx":3823
 *         self._object_to_pin = buf
 * 
 *         flat_reader = new schema_cpp.FlatArrayMessageReader(             # <<<<<<<<<<<<<<
 *             schema_cpp.WordArrayPtr(<schema_cpp.word*>ptr, sz//8),
 *             opts)
 */
  try {
    __pyx_t_1 = new  ::capnp::FlatArrayMessageReader( ::kj::ArrayPtr< ::capnp::word>((( ::capnp::word *)__pyx_v_ptr), __Pyx_div_Py_ssize_t(__pyx_v_sz, 8)), __pyx_v_opts);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3823, __pyx_L1_error)
  }
  __pyx_v_flat_reader = __pyx_t_1;

  /* "capnp/lib/capnp.pyx":3826
 *             schema_cpp.WordArrayPtr(<schema_cpp.word*>ptr, sz//8),
 *             opts)
 *         self.thisptr = flat_reader             # <<<<<<<<<<<<<<
 *         self.msg_size = <char *>flat_reader.getEnd() - ptr
 *         return self
 */
  __pyx_v_self->__pyx_base.thisptr = __pyx_v_flat_reader;

  /* "capnp/lib/capnp.pyx":3827
 *             opts)
 *         self.thisptr = flat_reader
 *         self.msg_size = <char *>flat_reader.getEnd() - ptr             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->msg_size = (((char *)__pyx_v_flat_reader->getEnd()) - __pyx_v_ptr);

  /* "capnp/lib/capnp.pyx":3828
 *         self.thisptr = flat_reader
 *         self.msg_size = <char *>flat_reader.getEnd() - ptr
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3817
 * 
 * 
 *     cdef _init(self, buf, const char *ptr, Py_ssize_t sz, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         cdef schema_cpp.FlatArrayMessageReader * flat_reader
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._FlatArrayMessageReaderAligned._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3830
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3831
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  delete __pyx_v_self->__pyx_base.thisptr;

  /* "capnp/lib/capnp.pyx":3830
 *         return self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_4__reduce_cython__[] = "_FlatArrayMessageReaderAligned.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FlatArrayMessageReaderAligned.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_6__setstate_cython__[] = "_FlatArrayMessageReaderAligned.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FlatArrayMessageReaderAligned.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3837
 * cdef class _FlatArrayMessageReader(_MessageReader):
 *     cdef object _object_to_pin
 *     def __init__(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         cdef _AlignedBuffer aligned
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_buf = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 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_buf,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3837, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_buf = values[0];
    __pyx_v_traversal_limit_in_words = values[1];
    __pyx_v_nesting_limit = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3837, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._FlatArrayMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)__pyx_v_self), __pyx_v_buf, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *__pyx_v_self, PyObject *__pyx_v_buf, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
   ::capnp::ReaderOptions __pyx_v_opts;
  struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_aligned = 0;
  PyObject *__pyx_v_sz = NULL;
  char *__pyx_v_ptr;
  struct __pyx_obj_5capnp_3lib_5capnp__BufferView *__pyx_v_view = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  size_t __pyx_t_7;
   ::capnp::FlatArrayMessageReader *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3838
 *     cdef object _object_to_pin
 *     def __init__(self, buf, traversal_limit_in_words = None, nesting_limit = None):
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *         cdef _AlignedBuffer aligned
 * 
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":3841
 *         cdef _AlignedBuffer aligned
 * 
 *         sz = len(buf)             # <<<<<<<<<<<<<<
 *         if sz % 8 != 0:
 *             raise ValueError("input length must be a multiple of eight bytes")
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_buf); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3841, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_sz = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":3842
 * 
 *         sz = len(buf)
 *         if sz % 8 != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("input length must be a multiple of eight bytes")
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_RemainderObjC(__pyx_v_sz, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_NeObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3842, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "capnp/lib/capnp.pyx":3843
 *         sz = len(buf)
 *         if sz % 8 != 0:
 *             raise ValueError("input length must be a multiple of eight bytes")             # <<<<<<<<<<<<<<
 * 
 *         cdef char * ptr
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3843, __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_ERR(0, 3843, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3842
 * 
 *         sz = len(buf)
 *         if sz % 8 != 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("input length must be a multiple of eight bytes")
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":3846
 * 
 *         cdef char * ptr
 *         if isinstance(buf, bytes):             # <<<<<<<<<<<<<<
 *             ptr = buf
 *             if (<uintptr_t>ptr) % 8 != 0:
 */
  __pyx_t_4 = PyBytes_Check(__pyx_v_buf); 
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "capnp/lib/capnp.pyx":3847
 *         cdef char * ptr
 *         if isinstance(buf, bytes):
 *             ptr = buf             # <<<<<<<<<<<<<<
 *             if (<uintptr_t>ptr) % 8 != 0:
 *                 aligned = _AlignedBuffer(buf)
 */
    __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_buf); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 3847, __pyx_L1_error)
    __pyx_v_ptr = __pyx_t_6;

    /* "capnp/lib/capnp.pyx":3848
 *         if isinstance(buf, bytes):
 *             ptr = buf
 *             if (<uintptr_t>ptr) % 8 != 0:             # <<<<<<<<<<<<<<
 *                 aligned = _AlignedBuffer(buf)
 *                 ptr = aligned.buf
 */
    __pyx_t_5 = (((((uintptr_t)__pyx_v_ptr) % 8) != 0) != 0);
    if (__pyx_t_5) {

      /* "capnp/lib/capnp.pyx":3849
 *             ptr = buf
 *             if (<uintptr_t>ptr) % 8 != 0:
 *                 aligned = _AlignedBuffer(buf)             # <<<<<<<<<<<<<<
 *                 ptr = aligned.buf
 *                 self._object_to_pin = aligned
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__AlignedBuffer), __pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_aligned = ((struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "capnp/lib/capnp.pyx":3850
 *             if (<uintptr_t>ptr) % 8 != 0:
 *                 aligned = _AlignedBuffer(buf)
 *                 ptr = aligned.buf             # <<<<<<<<<<<<<<
 *                 self._object_to_pin = aligned
 *             else:
 */
      __pyx_t_6 = __pyx_v_aligned->buf;
      __pyx_v_ptr = __pyx_t_6;

      /* "capnp/lib/capnp.pyx":3851
 *                 aligned = _AlignedBuffer(buf)
 *                 ptr = aligned.buf
 *                 self._object_to_pin = aligned             # <<<<<<<<<<<<<<
 *             else:
 *                 self._object_to_pin = buf
 */
      __Pyx_INCREF(((PyObject *)__pyx_v_aligned));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_aligned));
      __Pyx_GOTREF(__pyx_v_self->_object_to_pin);
      __Pyx_DECREF(__pyx_v_self->_object_to_pin);
      __pyx_v_self->_object_to_pin = ((PyObject *)__pyx_v_aligned);

      /* "capnp/lib/capnp.pyx":3848
 *         if isinstance(buf, bytes):
 *             ptr = buf
 *             if (<uintptr_t>ptr) % 8 != 0:             # <<<<<<<<<<<<<<
 *                 aligned = _AlignedBuffer(buf)
 *                 ptr = aligned.buf
 */
      goto __pyx_L5;
    }

    /* "capnp/lib/capnp.pyx":3853
 *                 self._object_to_pin = aligned
 *             else:
 *                 self._object_to_pin = buf             # <<<<<<<<<<<<<<
 *         elif PyObject_CheckBuffer(buf):
 *             view = _BufferView(buf)
 */
    /*else*/ {
      __Pyx_INCREF(__pyx_v_buf);
      __Pyx_GIVEREF(__pyx_v_buf);
      __Pyx_GOTREF(__pyx_v_self->_object_to_pin);
      __Pyx_DECREF(__pyx_v_self->_object_to_pin);
      __pyx_v_self->_object_to_pin = __pyx_v_buf;
    }
    __pyx_L5:;

    /* "capnp/lib/capnp.pyx":3846
 * 
 *         cdef char * ptr
 *         if isinstance(buf, bytes):             # <<<<<<<<<<<<<<
 *             ptr = buf
 *             if (<uintptr_t>ptr) % 8 != 0:
 */
    goto __pyx_L4;
  }

  /* "capnp/lib/capnp.pyx":3854
 *             else:
 *                 self._object_to_pin = buf
 *         elif PyObject_CheckBuffer(buf):             # <<<<<<<<<<<<<<
 *             view = _BufferView(buf)
 *             ptr = view.buf
 */
  __pyx_t_5 = (PyObject_CheckBuffer(__pyx_v_buf) != 0);
  if (likely(__pyx_t_5)) {

    /* "capnp/lib/capnp.pyx":3855
 *                 self._object_to_pin = buf
 *         elif PyObject_CheckBuffer(buf):
 *             view = _BufferView(buf)             # <<<<<<<<<<<<<<
 *             ptr = view.buf
 *             self._object_to_pin = view
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__BufferView), __pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3855, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_view = ((struct __pyx_obj_5capnp_3lib_5capnp__BufferView *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":3856
 *         elif PyObject_CheckBuffer(buf):
 *             view = _BufferView(buf)
 *             ptr = view.buf             # <<<<<<<<<<<<<<
 *             self._object_to_pin = view
 *         else:
 */
    __pyx_t_6 = __pyx_v_view->buf;
    __pyx_v_ptr = __pyx_t_6;

    /* "capnp/lib/capnp.pyx":3857
 *             view = _BufferView(buf)
 *             ptr = view.buf
 *             self._object_to_pin = view             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError('expected buffer-like object in FlatArrayMessageReader')
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_view));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_view));
    __Pyx_GOTREF(__pyx_v_self->_object_to_pin);
    __Pyx_DECREF(__pyx_v_self->_object_to_pin);
    __pyx_v_self->_object_to_pin = ((PyObject *)__pyx_v_view);

    /* "capnp/lib/capnp.pyx":3854
 *             else:
 *                 self._object_to_pin = buf
 *         elif PyObject_CheckBuffer(buf):             # <<<<<<<<<<<<<<
 *             view = _BufferView(buf)
 *             ptr = view.buf
 */
    goto __pyx_L4;
  }

  /* "capnp/lib/capnp.pyx":3859
 *             self._object_to_pin = view
 *         else:
 *             raise TypeError('expected buffer-like object in FlatArrayMessageReader')             # <<<<<<<<<<<<<<
 * 
 *         self.thisptr = new schema_cpp.FlatArrayMessageReader(
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3859, __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_ERR(0, 3859, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "capnp/lib/capnp.pyx":3862
 * 
 *         self.thisptr = new schema_cpp.FlatArrayMessageReader(
 *             schema_cpp.WordArrayPtr(<schema_cpp.word*>ptr, sz//8),             # <<<<<<<<<<<<<<
 *             opts)
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_FloorDivideObjC(__pyx_v_sz, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3861
 *             raise TypeError('expected buffer-like object in FlatArrayMessageReader')
 * 
 *         self.thisptr = new schema_cpp.FlatArrayMessageReader(             # <<<<<<<<<<<<<<
 *             schema_cpp.WordArrayPtr(<schema_cpp.word*>ptr, sz//8),
 *             opts)
 */
  try {
    __pyx_t_8 = new  ::capnp::FlatArrayMessageReader( ::kj::ArrayPtr< ::capnp::word>((( ::capnp::word *)__pyx_v_ptr), __pyx_t_7), __pyx_v_opts);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3861, __pyx_L1_error)
  }
  __pyx_v_self->__pyx_base.thisptr = __pyx_t_8;

  /* "capnp/lib/capnp.pyx":3837
 * cdef class _FlatArrayMessageReader(_MessageReader):
 *     cdef object _object_to_pin
 *     def __init__(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         cdef _AlignedBuffer aligned
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("capnp.lib.capnp._FlatArrayMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_aligned);
  __Pyx_XDECREF(__pyx_v_sz);
  __Pyx_XDECREF((PyObject *)__pyx_v_view);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3865
 *             opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3866
 * 
 *     def __dealloc__(self):
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  delete __pyx_v_self->__pyx_base.thisptr;

  /* "capnp/lib/capnp.pyx":3865
 *             opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_23_FlatArrayMessageReader_4__reduce_cython__[] = "_FlatArrayMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FlatArrayMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_23_FlatArrayMessageReader_6__setstate_cython__[] = "_FlatArrayMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_23_FlatArrayMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FlatArrayMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3876
 *     cdef Py_buffer* views
 * 
 *     def __init__(self, segments, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         # take a Python array of bytes and constructs a ConstWordArrayArrayPtr
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_segments = 0;
  PyObject *__pyx_v_traversal_limit_in_words = 0;
  PyObject *__pyx_v_nesting_limit = 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_segments,&__pyx_n_s_traversal_limit_in_words,&__pyx_n_s_nesting_limit,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_segments)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_traversal_limit_in_words);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nesting_limit);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3876, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_segments = values[0];
    __pyx_v_traversal_limit_in_words = values[1];
    __pyx_v_nesting_limit = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3876, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._SegmentArrayMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader___init__(((struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *)__pyx_v_self), __pyx_v_segments, __pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader___init__(struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *__pyx_v_self, PyObject *__pyx_v_segments, PyObject *__pyx_v_traversal_limit_in_words, PyObject *__pyx_v_nesting_limit) {
   ::capnp::ReaderOptions __pyx_v_opts;
  PyObject *__pyx_v_num_segments = NULL;
   ::kj::ArrayPtr< const ::capnp::word> __pyx_v_seg_ptr;
  PyObject *__pyx_v_i = NULL;
  struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *__pyx_v_aligned = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  char *__pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
   ::capnp::SegmentArrayMessageReader *__pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":3877
 * 
 *     def __init__(self, segments, traversal_limit_in_words = None, nesting_limit = None):
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)             # <<<<<<<<<<<<<<
 *         # take a Python array of bytes and constructs a ConstWordArrayArrayPtr
 *         num_segments = len(segments)
 */
  __pyx_v_opts = __pyx_f_5capnp_3lib_5capnp_make_reader_opts(__pyx_v_traversal_limit_in_words, __pyx_v_nesting_limit);

  /* "capnp/lib/capnp.pyx":3879
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         # take a Python array of bytes and constructs a ConstWordArrayArrayPtr
 *         num_segments = len(segments)             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ConstWordArrayPtr seg_ptr
 *         self._seg_ptrs = <schema_cpp.ConstWordArrayPtr*>malloc(num_segments * sizeof(schema_cpp.ConstWordArrayPtr))
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_segments); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3879, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_num_segments = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":3881
 *         num_segments = len(segments)
 *         cdef schema_cpp.ConstWordArrayPtr seg_ptr
 *         self._seg_ptrs = <schema_cpp.ConstWordArrayPtr*>malloc(num_segments * sizeof(schema_cpp.ConstWordArrayPtr))             # <<<<<<<<<<<<<<
 *         self.views = <Py_buffer*>malloc(num_segments * sizeof(Py_buffer))
 *         self._objects_to_pin = []
 */
  __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof( ::kj::ArrayPtr< const ::capnp::word>))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_num_segments, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3881, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_self->_seg_ptrs = (( ::kj::ArrayPtr< const ::capnp::word> *)malloc(__pyx_t_4));

  /* "capnp/lib/capnp.pyx":3882
 *         cdef schema_cpp.ConstWordArrayPtr seg_ptr
 *         self._seg_ptrs = <schema_cpp.ConstWordArrayPtr*>malloc(num_segments * sizeof(schema_cpp.ConstWordArrayPtr))
 *         self.views = <Py_buffer*>malloc(num_segments * sizeof(Py_buffer))             # <<<<<<<<<<<<<<
 *         self._objects_to_pin = []
 *         for i in range(0, num_segments):
 */
  __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(Py_buffer))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Multiply(__pyx_v_num_segments, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->views = ((Py_buffer *)malloc(__pyx_t_4));

  /* "capnp/lib/capnp.pyx":3883
 *         self._seg_ptrs = <schema_cpp.ConstWordArrayPtr*>malloc(num_segments * sizeof(schema_cpp.ConstWordArrayPtr))
 *         self.views = <Py_buffer*>malloc(num_segments * sizeof(Py_buffer))
 *         self._objects_to_pin = []             # <<<<<<<<<<<<<<
 *         for i in range(0, num_segments):
 *             if PyObject_GetBuffer(segments[i], &self.views[i], PyBUF_SIMPLE) != 0:
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_objects_to_pin);
  __Pyx_DECREF(__pyx_v_self->_objects_to_pin);
  __pyx_v_self->_objects_to_pin = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":3884
 *         self.views = <Py_buffer*>malloc(num_segments * sizeof(Py_buffer))
 *         self._objects_to_pin = []
 *         for i in range(0, num_segments):             # <<<<<<<<<<<<<<
 *             if PyObject_GetBuffer(segments[i], &self.views[i], PyBUF_SIMPLE) != 0:
 *                 raise KjException("could not get read buffer")
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
  __Pyx_INCREF(__pyx_v_num_segments);
  __Pyx_GIVEREF(__pyx_v_num_segments);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_num_segments);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3884, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 3884, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3884, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 3884, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3884, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3884, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "capnp/lib/capnp.pyx":3885
 *         self._objects_to_pin = []
 *         for i in range(0, num_segments):
 *             if PyObject_GetBuffer(segments[i], &self.views[i], PyBUF_SIMPLE) != 0:             # <<<<<<<<<<<<<<
 *                 raise KjException("could not get read buffer")
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_segments, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3885, __pyx_L1_error)
    __pyx_t_7 = ((PyObject_GetBuffer(__pyx_t_3, (&(__pyx_v_self->views[__pyx_t_6])), PyBUF_SIMPLE) != 0) != 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__pyx_t_7)) {

      /* "capnp/lib/capnp.pyx":3886
 *         for i in range(0, num_segments):
 *             if PyObject_GetBuffer(segments[i], &self.views[i], PyBUF_SIMPLE) != 0:
 *                 raise KjException("could not get read buffer")             # <<<<<<<<<<<<<<
 * 
 *             if (<uintptr_t>self.views[i].buf) % 8 != 0:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_KjException); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(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);
        }
      }
      __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_s_could_not_get_read_buffer) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_could_not_get_read_buffer);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3886, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 3886, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":3885
 *         self._objects_to_pin = []
 *         for i in range(0, num_segments):
 *             if PyObject_GetBuffer(segments[i], &self.views[i], PyBUF_SIMPLE) != 0:             # <<<<<<<<<<<<<<
 *                 raise KjException("could not get read buffer")
 * 
 */
    }

    /* "capnp/lib/capnp.pyx":3888
 *                 raise KjException("could not get read buffer")
 * 
 *             if (<uintptr_t>self.views[i].buf) % 8 != 0:             # <<<<<<<<<<<<<<
 *                 aligned = _AlignedBuffer(segments[i])
 *                 self.views[i].buf = aligned.buf
 */
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3888, __pyx_L1_error)
    __pyx_t_7 = (((((uintptr_t)(__pyx_v_self->views[__pyx_t_6]).buf) % 8) != 0) != 0);
    if (__pyx_t_7) {

      /* "capnp/lib/capnp.pyx":3889
 * 
 *             if (<uintptr_t>self.views[i].buf) % 8 != 0:
 *                 aligned = _AlignedBuffer(segments[i])             # <<<<<<<<<<<<<<
 *                 self.views[i].buf = aligned.buf
 *                 self._objects_to_pin.append(aligned)
 */
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_segments, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__AlignedBuffer), __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_aligned, ((struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *)__pyx_t_8));
      __pyx_t_8 = 0;

      /* "capnp/lib/capnp.pyx":3890
 *             if (<uintptr_t>self.views[i].buf) % 8 != 0:
 *                 aligned = _AlignedBuffer(segments[i])
 *                 self.views[i].buf = aligned.buf             # <<<<<<<<<<<<<<
 *                 self._objects_to_pin.append(aligned)
 *             else:
 */
      __pyx_t_10 = __pyx_v_aligned->buf;
      __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3890, __pyx_L1_error)
      (__pyx_v_self->views[__pyx_t_6]).buf = __pyx_t_10;

      /* "capnp/lib/capnp.pyx":3891
 *                 aligned = _AlignedBuffer(segments[i])
 *                 self.views[i].buf = aligned.buf
 *                 self._objects_to_pin.append(aligned)             # <<<<<<<<<<<<<<
 *             else:
 *                 self._objects_to_pin.append(segments[i])
 */
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_self->_objects_to_pin, ((PyObject *)__pyx_v_aligned)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3891, __pyx_L1_error)

      /* "capnp/lib/capnp.pyx":3888
 *                 raise KjException("could not get read buffer")
 * 
 *             if (<uintptr_t>self.views[i].buf) % 8 != 0:             # <<<<<<<<<<<<<<
 *                 aligned = _AlignedBuffer(segments[i])
 *                 self.views[i].buf = aligned.buf
 */
      goto __pyx_L6;
    }

    /* "capnp/lib/capnp.pyx":3893
 *                 self._objects_to_pin.append(aligned)
 *             else:
 *                 self._objects_to_pin.append(segments[i])             # <<<<<<<<<<<<<<
 *             seg_ptr = schema_cpp.ConstWordArrayPtr(<schema_cpp.word*>self.views[i].buf, self.views[i].len//8)
 *             self._seg_ptrs[i] = seg_ptr
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_segments, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3893, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_self->_objects_to_pin, __pyx_t_8); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3893, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_L6:;

    /* "capnp/lib/capnp.pyx":3894
 *             else:
 *                 self._objects_to_pin.append(segments[i])
 *             seg_ptr = schema_cpp.ConstWordArrayPtr(<schema_cpp.word*>self.views[i].buf, self.views[i].len//8)             # <<<<<<<<<<<<<<
 *             self._seg_ptrs[i] = seg_ptr
 *         self.thisptr = new schema_cpp.SegmentArrayMessageReader(
 */
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3894, __pyx_L1_error)
    __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3894, __pyx_L1_error)
    __pyx_v_seg_ptr =  ::kj::ArrayPtr< const ::capnp::word>((( ::capnp::word *)(__pyx_v_self->views[__pyx_t_6]).buf), __Pyx_div_Py_ssize_t((__pyx_v_self->views[__pyx_t_12]).len, 8));

    /* "capnp/lib/capnp.pyx":3895
 *                 self._objects_to_pin.append(segments[i])
 *             seg_ptr = schema_cpp.ConstWordArrayPtr(<schema_cpp.word*>self.views[i].buf, self.views[i].len//8)
 *             self._seg_ptrs[i] = seg_ptr             # <<<<<<<<<<<<<<
 *         self.thisptr = new schema_cpp.SegmentArrayMessageReader(
 *             schema_cpp.ConstWordArrayArrayPtr(self._seg_ptrs, num_segments),
 */
    __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L1_error)
    (__pyx_v_self->_seg_ptrs[__pyx_t_12]) = __pyx_v_seg_ptr;

    /* "capnp/lib/capnp.pyx":3884
 *         self.views = <Py_buffer*>malloc(num_segments * sizeof(Py_buffer))
 *         self._objects_to_pin = []
 *         for i in range(0, num_segments):             # <<<<<<<<<<<<<<
 *             if PyObject_GetBuffer(segments[i], &self.views[i], PyBUF_SIMPLE) != 0:
 *                 raise KjException("could not get read buffer")
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":3897
 *             self._seg_ptrs[i] = seg_ptr
 *         self.thisptr = new schema_cpp.SegmentArrayMessageReader(
 *             schema_cpp.ConstWordArrayArrayPtr(self._seg_ptrs, num_segments),             # <<<<<<<<<<<<<<
 *             opts)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_num_segments); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3897, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3896
 *             seg_ptr = schema_cpp.ConstWordArrayPtr(<schema_cpp.word*>self.views[i].buf, self.views[i].len//8)
 *             self._seg_ptrs[i] = seg_ptr
 *         self.thisptr = new schema_cpp.SegmentArrayMessageReader(             # <<<<<<<<<<<<<<
 *             schema_cpp.ConstWordArrayArrayPtr(self._seg_ptrs, num_segments),
 *             opts)
 */
  try {
    __pyx_t_13 = new  ::capnp::SegmentArrayMessageReader( ::kj::ArrayPtr< const ::kj::ArrayPtr< const ::capnp::word>>(__pyx_v_self->_seg_ptrs, __pyx_t_4), __pyx_v_opts);
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3896, __pyx_L1_error)
  }
  __pyx_v_self->__pyx_base.thisptr = __pyx_t_13;

  /* "capnp/lib/capnp.pyx":3876
 *     cdef Py_buffer* views
 * 
 *     def __init__(self, segments, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
 *         # take a Python array of bytes and constructs a ConstWordArrayArrayPtr
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("capnp.lib.capnp._SegmentArrayMessageReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_num_segments);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF((PyObject *)__pyx_v_aligned);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3900
 *             opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         free(self._seg_ptrs)
 *         free(self.views)
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3901
 * 
 *     def __dealloc__(self):
 *         free(self._seg_ptrs)             # <<<<<<<<<<<<<<
 *         free(self.views)
 *         del self.thisptr
 */
  free(__pyx_v_self->_seg_ptrs);

  /* "capnp/lib/capnp.pyx":3902
 *     def __dealloc__(self):
 *         free(self._seg_ptrs)
 *         free(self.views)             # <<<<<<<<<<<<<<
 *         del self.thisptr
 * 
 */
  free(__pyx_v_self->views);

  /* "capnp/lib/capnp.pyx":3903
 *         free(self._seg_ptrs)
 *         free(self.views)
 *         del self.thisptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  delete __pyx_v_self->__pyx_base.thisptr;

  /* "capnp/lib/capnp.pyx":3900
 *             opts)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         free(self._seg_ptrs)
 *         free(self.views)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_4__reduce_cython__[] = "_SegmentArrayMessageReader.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._SegmentArrayMessageReader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_6__setstate_cython__[] = "_SegmentArrayMessageReader.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._SegmentArrayMessageReader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3910
 *     cdef object _object_to_pin
 *     cdef Py_buffer view
 *     def __init__(self, buf):             # <<<<<<<<<<<<<<
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_WRITABLE) != 0:
 *             raise KjException("expected variable length string object")
 */

/* Python wrapper */
static int __pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_buf = 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_buf,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3910, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_buf = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3910, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._FlatMessageBuilder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder___init__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *)__pyx_v_self), __pyx_v_buf);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder___init__(struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *__pyx_v_self, PyObject *__pyx_v_buf) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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("__init__", 0);

  /* "capnp/lib/capnp.pyx":3911
 *     cdef Py_buffer view
 *     def __init__(self, buf):
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_WRITABLE) != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("expected variable length string object")
 *         if self.view.len % 8 != 0:
 */
  __pyx_t_1 = ((PyObject_GetBuffer(__pyx_v_buf, (&__pyx_v_self->view), PyBUF_WRITABLE) != 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":3912
 *     def __init__(self, buf):
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_WRITABLE) != 0:
 *             raise KjException("expected variable length string object")             # <<<<<<<<<<<<<<
 *         if self.view.len % 8 != 0:
 *             raise KjException("input length must be a multiple of eight bytes")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_expected_variable_length_string) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_expected_variable_length_string);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3912, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3911
 *     cdef Py_buffer view
 *     def __init__(self, buf):
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_WRITABLE) != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("expected variable length string object")
 *         if self.view.len % 8 != 0:
 */
  }

  /* "capnp/lib/capnp.pyx":3913
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_WRITABLE) != 0:
 *             raise KjException("expected variable length string object")
 *         if self.view.len % 8 != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("input length must be a multiple of eight bytes")
 *         self._object_to_pin = buf
 */
  __pyx_t_1 = ((__Pyx_mod_Py_ssize_t(__pyx_v_self->view.len, 8) != 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "capnp/lib/capnp.pyx":3914
 *             raise KjException("expected variable length string object")
 *         if self.view.len % 8 != 0:
 *             raise KjException("input length must be a multiple of eight bytes")             # <<<<<<<<<<<<<<
 *         self._object_to_pin = buf
 *         self.thisptr = new schema_cpp.FlatMessageBuilder(schema_cpp.WordArrayPtr(<schema_cpp.word*>self.view.buf, self.view.len//8))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_KjException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_input_length_must_be_a_multiple) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_input_length_must_be_a_multiple);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 3914, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3913
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_WRITABLE) != 0:
 *             raise KjException("expected variable length string object")
 *         if self.view.len % 8 != 0:             # <<<<<<<<<<<<<<
 *             raise KjException("input length must be a multiple of eight bytes")
 *         self._object_to_pin = buf
 */
  }

  /* "capnp/lib/capnp.pyx":3915
 *         if self.view.len % 8 != 0:
 *             raise KjException("input length must be a multiple of eight bytes")
 *         self._object_to_pin = buf             # <<<<<<<<<<<<<<
 *         self.thisptr = new schema_cpp.FlatMessageBuilder(schema_cpp.WordArrayPtr(<schema_cpp.word*>self.view.buf, self.view.len//8))
 * 
 */
  __Pyx_INCREF(__pyx_v_buf);
  __Pyx_GIVEREF(__pyx_v_buf);
  __Pyx_GOTREF(__pyx_v_self->_object_to_pin);
  __Pyx_DECREF(__pyx_v_self->_object_to_pin);
  __pyx_v_self->_object_to_pin = __pyx_v_buf;

  /* "capnp/lib/capnp.pyx":3916
 *             raise KjException("input length must be a multiple of eight bytes")
 *         self._object_to_pin = buf
 *         self.thisptr = new schema_cpp.FlatMessageBuilder(schema_cpp.WordArrayPtr(<schema_cpp.word*>self.view.buf, self.view.len//8))             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->__pyx_base.thisptr = new  ::capnp::FlatMessageBuilder( ::kj::ArrayPtr< ::capnp::word>((( ::capnp::word *)__pyx_v_self->view.buf), __Pyx_div_Py_ssize_t(__pyx_v_self->view.len, 8)));

  /* "capnp/lib/capnp.pyx":3910
 *     cdef object _object_to_pin
 *     cdef Py_buffer view
 *     def __init__(self, buf):             # <<<<<<<<<<<<<<
 *         if PyObject_GetBuffer(buf, &self.view, PyBUF_WRITABLE) != 0:
 *             raise KjException("expected variable length string object")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("capnp.lib.capnp._FlatMessageBuilder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3918
 *         self.thisptr = new schema_cpp.FlatMessageBuilder(schema_cpp.WordArrayPtr(<schema_cpp.word*>self.view.buf, self.view.len//8))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyBuffer_Release(&self.view)
 * 
 */

/* Python wrapper */
static void __pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder_2__dealloc__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder_2__dealloc__(struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "capnp/lib/capnp.pyx":3919
 * 
 *     def __dealloc__(self):
 *         PyBuffer_Release(&self.view)             # <<<<<<<<<<<<<<
 * 
 * def _message_to_packed_bytes(_MessageBuilder message):
 */
  PyBuffer_Release((&__pyx_v_self->view));

  /* "capnp/lib/capnp.pyx":3918
 *         self.thisptr = new schema_cpp.FlatMessageBuilder(schema_cpp.WordArrayPtr(<schema_cpp.word*>self.view.buf, self.view.len//8))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyBuffer_Release(&self.view)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_FlatMessageBuilder_4__reduce_cython__[] = "_FlatMessageBuilder.__reduce_cython__(self)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder_4__reduce_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *__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("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__130, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __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_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FlatMessageBuilder.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_19_FlatMessageBuilder_6__setstate_cython__[] = "_FlatMessageBuilder.__setstate_cython__(self, __pyx_state)";
static PyObject *__pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder_6__setstate_cython__(((struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_19_FlatMessageBuilder_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  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("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__131, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __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_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp._FlatMessageBuilder.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3921
 *         PyBuffer_Release(&self.view)
 * 
 * def _message_to_packed_bytes(_MessageBuilder message):             # <<<<<<<<<<<<<<
 *     r, w = _os.pipe()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_message_to_packed_bytes(PyObject *__pyx_self, PyObject *__pyx_v_message); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_22_message_to_packed_bytes[] = "_message_to_packed_bytes(_MessageBuilder message)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_23_message_to_packed_bytes = {"_message_to_packed_bytes", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_23_message_to_packed_bytes, METH_O, __pyx_doc_5capnp_3lib_5capnp_22_message_to_packed_bytes};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_23_message_to_packed_bytes(PyObject *__pyx_self, PyObject *__pyx_v_message) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_message_to_packed_bytes (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder, 1, "message", 0))) __PYX_ERR(0, 3921, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_22_message_to_packed_bytes(__pyx_self, ((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)__pyx_v_message));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_22_message_to_packed_bytes(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_message) {
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_w = NULL;
   ::kj::FdOutputStream *__pyx_v_writer;
  PyObject *__pyx_v_reader = NULL;
  PyObject *__pyx_v_ret = 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)(PyObject *);
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_message_to_packed_bytes", 0);

  /* "capnp/lib/capnp.pyx":3922
 * 
 * def _message_to_packed_bytes(_MessageBuilder message):
 *     r, w = _os.pipe()             # <<<<<<<<<<<<<<
 * 
 *     writer = new schema_cpp.FdOutputStream(w)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pipe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 3922, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 3922, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 3922, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_r = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_w = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":3924
 *     r, w = _os.pipe()
 * 
 *     writer = new schema_cpp.FdOutputStream(w)             # <<<<<<<<<<<<<<
 *     schema_cpp.writePackedMessage(deref(writer), deref(message.thisptr))
 *     _os.close(w)
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_w); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3924, __pyx_L1_error)
  __pyx_v_writer = new  ::kj::FdOutputStream(__pyx_t_6);

  /* "capnp/lib/capnp.pyx":3925
 * 
 *     writer = new schema_cpp.FdOutputStream(w)
 *     schema_cpp.writePackedMessage(deref(writer), deref(message.thisptr))             # <<<<<<<<<<<<<<
 *     _os.close(w)
 * 
 */
  try {
     ::capnp::writePackedMessage((*__pyx_v_writer), (*__pyx_v_message->thisptr));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3925, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":3926
 *     writer = new schema_cpp.FdOutputStream(w)
 *     schema_cpp.writePackedMessage(deref(writer), deref(message.thisptr))
 *     _os.close(w)             # <<<<<<<<<<<<<<
 * 
 *     reader = _os.fdopen(r, 'rb')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_w) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_w);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3928
 *     _os.close(w)
 * 
 *     reader = _os.fdopen(r, 'rb')             # <<<<<<<<<<<<<<
 *     ret = reader.read()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_fdopen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(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);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_r, __pyx_n_s_rb};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3928, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_r, __pyx_n_s_rb};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3928, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_r);
    __Pyx_GIVEREF(__pyx_v_r);
    PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_r);
    __Pyx_INCREF(__pyx_n_s_rb);
    __Pyx_GIVEREF(__pyx_n_s_rb);
    PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_n_s_rb);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_reader = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3929
 * 
 *     reader = _os.fdopen(r, 'rb')
 *     ret = reader.read()             # <<<<<<<<<<<<<<
 * 
 *     del writer
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_reader, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ret = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3931
 *     ret = reader.read()
 * 
 *     del writer             # <<<<<<<<<<<<<<
 *     reader.close()
 * 
 */
  delete __pyx_v_writer;

  /* "capnp/lib/capnp.pyx":3932
 * 
 *     del writer
 *     reader.close()             # <<<<<<<<<<<<<<
 * 
 *     return ret
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_reader, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3932, __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;

  /* "capnp/lib/capnp.pyx":3934
 *     reader.close()
 * 
 *     return ret             # <<<<<<<<<<<<<<
 * 
 * def _write_message_to_fd(int fd, _MessageBuilder message):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3921
 *         PyBuffer_Release(&self.view)
 * 
 * def _message_to_packed_bytes(_MessageBuilder message):             # <<<<<<<<<<<<<<
 *     r, w = _os.pipe()
 * 
 */

  /* 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("capnp.lib.capnp._message_to_packed_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_w);
  __Pyx_XDECREF(__pyx_v_reader);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3936
 *     return ret
 * 
 * def _write_message_to_fd(int fd, _MessageBuilder message):             # <<<<<<<<<<<<<<
 *     """Serialize a Cap'n Proto message to a file descriptor
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_25_write_message_to_fd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_24_write_message_to_fd[] = "_write_message_to_fd(int fd, _MessageBuilder message)\nSerialize a Cap'n Proto message to a file descriptor\n\n    You use this method to serialize your message to a file. Please note that\n    you must pass a file descriptor (ie. an int), not a file object. Make sure\n    you use the proper reader to match this (ie. don't use _PackedFdMessageReader)::\n\n        message = capnp._MallocMessageBuilder()\n        ...\n        f = open('out.txt', 'w')\n        _write_message_to_fd(f.fileno(), message)\n        ...\n        f = open('out.txt')\n        _StreamFdMessageReader(f)\n\n    :type fd: int\n    :param fd: A file descriptor\n\n    :type message: :class:`_MessageBuilder`\n    :param message: The Cap'n Proto message to serialize\n\n    :rtype: void\n    ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_25_write_message_to_fd = {"_write_message_to_fd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_25_write_message_to_fd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_24_write_message_to_fd};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_25_write_message_to_fd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_fd;
  struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_message = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_write_message_to_fd (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_message,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_write_message_to_fd", 1, 2, 2, 1); __PYX_ERR(0, 3936, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_write_message_to_fd") < 0)) __PYX_ERR(0, 3936, __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_fd = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3936, __pyx_L3_error)
    __pyx_v_message = ((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_write_message_to_fd", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3936, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._write_message_to_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder, 1, "message", 0))) __PYX_ERR(0, 3936, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_24_write_message_to_fd(__pyx_self, __pyx_v_fd, __pyx_v_message);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_24_write_message_to_fd(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_fd, struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_message) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_write_message_to_fd", 0);

  /* "capnp/lib/capnp.pyx":3959
 *     :rtype: void
 *     """
 *     schema_cpp.writeMessageToFd(fd, deref(message.thisptr))             # <<<<<<<<<<<<<<
 * 
 * def _write_packed_message_to_fd(int fd, _MessageBuilder message):
 */
  try {
     ::capnp::writeMessageToFd(__pyx_v_fd, (*__pyx_v_message->thisptr));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3959, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":3936
 *     return ret
 * 
 * def _write_message_to_fd(int fd, _MessageBuilder message):             # <<<<<<<<<<<<<<
 *     """Serialize a Cap'n Proto message to a file descriptor
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._write_message_to_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3961
 *     schema_cpp.writeMessageToFd(fd, deref(message.thisptr))
 * 
 * def _write_packed_message_to_fd(int fd, _MessageBuilder message):             # <<<<<<<<<<<<<<
 *     """Serialize a Cap'n Proto message to a file descriptor in a packed manner
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_write_packed_message_to_fd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_26_write_packed_message_to_fd[] = "_write_packed_message_to_fd(int fd, _MessageBuilder message)\nSerialize a Cap'n Proto message to a file descriptor in a packed manner\n\n    You use this method to serialize your message to a file. Please note that\n    you must pass a file descriptor (ie. an int), not a file object. Also, note\n    the difference in names with _write_message_to_fd. This method uses a different\n    serialization specification, and your reader will need to match.::\n\n        message = capnp._MallocMessageBuilder()\n        ...\n        f = open('out.txt', 'w')\n        _write_packed_message_to_fd(f.fileno(), message)\n        ...\n        f = open('out.txt')\n        _PackedFdMessageReader(f)\n\n    :type fd: int\n    :param fd: A file descriptor\n\n    :type message: :class:`_MessageBuilder`\n    :param message: The Cap'n Proto message to serialize\n\n    :rtype: void\n    ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_27_write_packed_message_to_fd = {"_write_packed_message_to_fd", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_27_write_packed_message_to_fd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_26_write_packed_message_to_fd};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_27_write_packed_message_to_fd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_fd;
  struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_message = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_write_packed_message_to_fd (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,&__pyx_n_s_message,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_write_packed_message_to_fd", 1, 2, 2, 1); __PYX_ERR(0, 3961, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_write_packed_message_to_fd") < 0)) __PYX_ERR(0, 3961, __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_fd = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3961, __pyx_L3_error)
    __pyx_v_message = ((struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_write_packed_message_to_fd", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3961, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._write_packed_message_to_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder, 1, "message", 0))) __PYX_ERR(0, 3961, __pyx_L1_error)
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_26_write_packed_message_to_fd(__pyx_self, __pyx_v_fd, __pyx_v_message);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_26_write_packed_message_to_fd(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_fd, struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *__pyx_v_message) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_write_packed_message_to_fd", 0);

  /* "capnp/lib/capnp.pyx":3985
 *     :rtype: void
 *     """
 *     schema_cpp.writePackedMessageToFd(fd, deref(message.thisptr))             # <<<<<<<<<<<<<<
 * 
 * _global_schema_parser = None
 */
  try {
     ::capnp::writePackedMessageToFd(__pyx_v_fd, (*__pyx_v_message->thisptr));
  } catch(...) {
    reraise_kj_exception(); if (!PyErr_Occurred())PyErr_SetString(PyExc_RuntimeError, "Error converting c++ exception.");
    __PYX_ERR(0, 3985, __pyx_L1_error)
  }

  /* "capnp/lib/capnp.pyx":3961
 *     schema_cpp.writeMessageToFd(fd, deref(message.thisptr))
 * 
 * def _write_packed_message_to_fd(int fd, _MessageBuilder message):             # <<<<<<<<<<<<<<
 *     """Serialize a Cap'n Proto message to a file descriptor in a packed manner
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._write_packed_message_to_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3989
 * _global_schema_parser = None
 * 
 * def cleanup_global_schema_parser():             # <<<<<<<<<<<<<<
 *     """Unloads all of the schema from the current context"""
 *     global _global_schema_parser
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_29cleanup_global_schema_parser(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_28cleanup_global_schema_parser[] = "cleanup_global_schema_parser()\nUnloads all of the schema from the current context";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_29cleanup_global_schema_parser = {"cleanup_global_schema_parser", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_29cleanup_global_schema_parser, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_28cleanup_global_schema_parser};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_29cleanup_global_schema_parser(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cleanup_global_schema_parser (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_28cleanup_global_schema_parser(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_28cleanup_global_schema_parser(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cleanup_global_schema_parser", 0);

  /* "capnp/lib/capnp.pyx":3992
 *     """Unloads all of the schema from the current context"""
 *     global _global_schema_parser
 *     if _global_schema_parser:             # <<<<<<<<<<<<<<
 *         del _global_schema_parser
 *         _global_schema_parser = None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_global_schema_parser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3992, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "capnp/lib/capnp.pyx":3993
 *     global _global_schema_parser
 *     if _global_schema_parser:
 *         del _global_schema_parser             # <<<<<<<<<<<<<<
 *         _global_schema_parser = None
 * 
 */
    if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_global_schema_parser) < 0) __PYX_ERR(0, 3993, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3994
 *     if _global_schema_parser:
 *         del _global_schema_parser
 *         _global_schema_parser = None             # <<<<<<<<<<<<<<
 * 
 * def load(file_name, display_name=None, imports=[]):
 */
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_schema_parser, Py_None) < 0) __PYX_ERR(0, 3994, __pyx_L1_error)

    /* "capnp/lib/capnp.pyx":3992
 *     """Unloads all of the schema from the current context"""
 *     global _global_schema_parser
 *     if _global_schema_parser:             # <<<<<<<<<<<<<<
 *         del _global_schema_parser
 *         _global_schema_parser = None
 */
  }

  /* "capnp/lib/capnp.pyx":3989
 * _global_schema_parser = None
 * 
 * def cleanup_global_schema_parser():             # <<<<<<<<<<<<<<
 *     """Unloads all of the schema from the current context"""
 *     global _global_schema_parser
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("capnp.lib.capnp.cleanup_global_schema_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":3996
 *         _global_schema_parser = None
 * 
 * def load(file_name, display_name=None, imports=[]):             # <<<<<<<<<<<<<<
 *     """Load a Cap'n Proto schema from a file
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_31load(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_30load[] = "load(file_name, display_name=None, imports=[])\nLoad a Cap'n Proto schema from a file\n\n    You will have to load a schema before you can begin doing anything\n    meaningful with this library. Loading a schema is much like loading\n    a Python module (and load even returns a `ModuleType`). Once it's been\n    loaded, you use it much like any other Module::\n\n        addressbook = capnp.load('addressbook.capnp')\n        print addressbook.qux # qux is a top level constant in the addressbook.capnp schema\n        # 123\n        person = addressbook.Person.new_message()\n\n    :type file_name: str\n    :param file_name: A relative or absolute path to a Cap'n Proto schema\n\n    :type display_name: str\n    :param display_name: The name internally used by the Cap'n Proto library\n        for the loaded schema. By default, it's just os.path.basename(file_name)\n\n    :type imports: list\n    :param imports: A list of str directories to add to the import path.\n\n    :rtype: ModuleType\n    :return: A module corresponding to the loaded schema. You can access\n        parsed schemas and constants with . syntax\n\n    :Raises: :exc:`KjException` if `file_name` doesn't exist\n\n    ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_31load = {"load", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_31load, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_30load};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_31load(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_file_name = 0;
  PyObject *__pyx_v_display_name = 0;
  PyObject *__pyx_v_imports = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file_name,&__pyx_n_s_display_name,&__pyx_n_s_imports,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k__132;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_display_name);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_imports);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load") < 0)) __PYX_ERR(0, 3996, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_file_name = values[0];
    __pyx_v_display_name = values[1];
    __pyx_v_imports = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3996, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_30load(__pyx_self, __pyx_v_file_name, __pyx_v_display_name, __pyx_v_imports);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_30load(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_name, PyObject *__pyx_v_display_name, PyObject *__pyx_v_imports) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load", 0);

  /* "capnp/lib/capnp.pyx":4027
 *     """
 *     global _global_schema_parser
 *     if _global_schema_parser is None:             # <<<<<<<<<<<<<<
 *         _global_schema_parser = SchemaParser()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_global_schema_parser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":4028
 *     global _global_schema_parser
 *     if _global_schema_parser is None:
 *         _global_schema_parser = SchemaParser()             # <<<<<<<<<<<<<<
 * 
 *     return _global_schema_parser.load(file_name, display_name, imports)
 */
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp_SchemaParser)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_schema_parser, __pyx_t_1) < 0) __PYX_ERR(0, 4028, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":4027
 *     """
 *     global _global_schema_parser
 *     if _global_schema_parser is None:             # <<<<<<<<<<<<<<
 *         _global_schema_parser = SchemaParser()
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":4030
 *         _global_schema_parser = SchemaParser()
 * 
 *     return _global_schema_parser.load(file_name, display_name, imports)             # <<<<<<<<<<<<<<
 * 
 * class _Loader:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_global_schema_parser); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_load_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_file_name, __pyx_v_display_name, __pyx_v_imports};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4030, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_file_name, __pyx_v_display_name, __pyx_v_imports};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4030, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_file_name);
    __Pyx_GIVEREF(__pyx_v_file_name);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_file_name);
    __Pyx_INCREF(__pyx_v_display_name);
    __Pyx_GIVEREF(__pyx_v_display_name);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_display_name);
    __Pyx_INCREF(__pyx_v_imports);
    __Pyx_GIVEREF(__pyx_v_imports);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_imports);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":3996
 *         _global_schema_parser = None
 * 
 * def load(file_name, display_name=None, imports=[]):             # <<<<<<<<<<<<<<
 *     """Load a Cap'n Proto schema from a file
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("capnp.lib.capnp.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":4033
 * 
 * class _Loader:
 *     def __init__(self, fullname, path, additional_paths):             # <<<<<<<<<<<<<<
 *         self.fullname = fullname
 *         self.path = path
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Loader_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_7_Loader___init__[] = "_Loader.__init__(self, fullname, path, additional_paths)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_7_Loader_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_7_Loader_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_7_Loader___init__};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Loader_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_fullname = 0;
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_additional_paths = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fullname,&__pyx_n_s_path,&__pyx_n_s_additional_paths,0};
    PyObject* values[4] = {0,0,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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fullname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 4033, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 4033, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 4033, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4033, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_fullname = values[1];
    __pyx_v_path = values[2];
    __pyx_v_additional_paths = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4033, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Loader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Loader___init__(__pyx_self, __pyx_v_self, __pyx_v_fullname, __pyx_v_path, __pyx_v_additional_paths);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Loader___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fullname, PyObject *__pyx_v_path, PyObject *__pyx_v_additional_paths) {
  PyObject *__pyx_v_dir_name = 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;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_additional_paths);

  /* "capnp/lib/capnp.pyx":4034
 * class _Loader:
 *     def __init__(self, fullname, path, additional_paths):
 *         self.fullname = fullname             # <<<<<<<<<<<<<<
 *         self.path = path
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fullname, __pyx_v_fullname) < 0) __PYX_ERR(0, 4034, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4035
 *     def __init__(self, fullname, path, additional_paths):
 *         self.fullname = fullname
 *         self.path = path             # <<<<<<<<<<<<<<
 * 
 *         # Add current directory of the capnp schema to search path
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_path, __pyx_v_path) < 0) __PYX_ERR(0, 4035, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4038
 * 
 *         # Add current directory of the capnp schema to search path
 *         dir_name = _os.path.dirname(path)             # <<<<<<<<<<<<<<
 *         if path is not '':
 *             additional_paths = [dir_name] + additional_paths
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dirname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_dir_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4039
 *         # Add current directory of the capnp schema to search path
 *         dir_name = _os.path.dirname(path)
 *         if path is not '':             # <<<<<<<<<<<<<<
 *             additional_paths = [dir_name] + additional_paths
 * 
 */
  __pyx_t_4 = (__pyx_v_path != __pyx_kp_s__4);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "capnp/lib/capnp.pyx":4040
 *         dir_name = _os.path.dirname(path)
 *         if path is not '':
 *             additional_paths = [dir_name] + additional_paths             # <<<<<<<<<<<<<<
 * 
 *         self.additional_paths = additional_paths
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_dir_name);
    __Pyx_GIVEREF(__pyx_v_dir_name);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_dir_name);
    __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_additional_paths); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4040, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_additional_paths, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":4039
 *         # Add current directory of the capnp schema to search path
 *         dir_name = _os.path.dirname(path)
 *         if path is not '':             # <<<<<<<<<<<<<<
 *             additional_paths = [dir_name] + additional_paths
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":4042
 *             additional_paths = [dir_name] + additional_paths
 * 
 *         self.additional_paths = additional_paths             # <<<<<<<<<<<<<<
 * 
 *     def load_module(self, fullname):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_additional_paths, __pyx_v_additional_paths) < 0) __PYX_ERR(0, 4042, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4033
 * 
 * class _Loader:
 *     def __init__(self, fullname, path, additional_paths):             # <<<<<<<<<<<<<<
 *         self.fullname = fullname
 *         self.path = path
 */

  /* 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_AddTraceback("capnp.lib.capnp._Loader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dir_name);
  __Pyx_XDECREF(__pyx_v_additional_paths);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":4044
 *         self.additional_paths = additional_paths
 * 
 *     def load_module(self, fullname):             # <<<<<<<<<<<<<<
 *         assert self.fullname == fullname, (
 *             "invalid module, expected %s, got %s" % (
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Loader_3load_module(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_7_Loader_2load_module[] = "_Loader.load_module(self, fullname)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_7_Loader_3load_module = {"load_module", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_7_Loader_3load_module, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_7_Loader_2load_module};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_7_Loader_3load_module(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_fullname = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_module (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fullname,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fullname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("load_module", 1, 2, 2, 1); __PYX_ERR(0, 4044, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load_module") < 0)) __PYX_ERR(0, 4044, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_fullname = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load_module", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4044, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Loader.load_module", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_7_Loader_2load_module(__pyx_self, __pyx_v_self, __pyx_v_fullname);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_7_Loader_2load_module(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fullname) {
  PyObject *__pyx_v_imports = NULL;
  PyObject *__pyx_v_module = NULL;
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_module", 0);

  /* "capnp/lib/capnp.pyx":4045
 * 
 *     def load_module(self, fullname):
 *         assert self.fullname == fullname, (             # <<<<<<<<<<<<<<
 *             "invalid module, expected %s, got %s" % (
 *             self.fullname, fullname))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fullname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_fullname, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4045, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4045, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) {

      /* "capnp/lib/capnp.pyx":4047
 *         assert self.fullname == fullname, (
 *             "invalid module, expected %s, got %s" % (
 *             self.fullname, fullname))             # <<<<<<<<<<<<<<
 * 
 *         imports = self.additional_paths + _sys.path
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fullname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __Pyx_INCREF(__pyx_v_fullname);
      __Pyx_GIVEREF(__pyx_v_fullname);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_fullname);
      __pyx_t_2 = 0;

      /* "capnp/lib/capnp.pyx":4046
 *     def load_module(self, fullname):
 *         assert self.fullname == fullname, (
 *             "invalid module, expected %s, got %s" % (             # <<<<<<<<<<<<<<
 *             self.fullname, fullname))
 * 
 */
      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_invalid_module_expected_s_got_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4046, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 4045, __pyx_L1_error)
    }
  }
  #endif

  /* "capnp/lib/capnp.pyx":4049
 *             self.fullname, fullname))
 * 
 *         imports = self.additional_paths + _sys.path             # <<<<<<<<<<<<<<
 *         imports = [path if path != '' else '.' for path in imports] # convert empty path '' to '.'
 *         module = load(self.path, fullname, imports=imports)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_additional_paths); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_imports = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4050
 * 
 *         imports = self.additional_paths + _sys.path
 *         imports = [path if path != '' else '.' for path in imports] # convert empty path '' to '.'             # <<<<<<<<<<<<<<
 *         module = load(self.path, fullname, imports=imports)
 *         _sys.modules[fullname] = module
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_v_imports)) || PyTuple_CheckExact(__pyx_v_imports)) {
    __pyx_t_4 = __pyx_v_imports; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_imports); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4050, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4050, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4050, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 4050, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4050, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 4050, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_path, __pyx_kp_s__4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4050, __pyx_L1_error)
    if (__pyx_t_3) {
      __Pyx_INCREF(__pyx_v_path);
      __pyx_t_2 = __pyx_v_path;
    } else {
      __Pyx_INCREF(__pyx_kp_s__133);
      __pyx_t_2 = __pyx_kp_s__133;
    }
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 4050, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_imports, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4051
 *         imports = self.additional_paths + _sys.path
 *         imports = [path if path != '' else '.' for path in imports] # convert empty path '' to '.'
 *         module = load(self.path, fullname, imports=imports)             # <<<<<<<<<<<<<<
 *         _sys.modules[fullname] = module
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_load_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_INCREF(__pyx_v_fullname);
  __Pyx_GIVEREF(__pyx_v_fullname);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_fullname);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_imports, __pyx_v_imports) < 0) __PYX_ERR(0, 4051, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_module = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "capnp/lib/capnp.pyx":4052
 *         imports = [path if path != '' else '.' for path in imports] # convert empty path '' to '.'
 *         module = load(self.path, fullname, imports=imports)
 *         _sys.modules[fullname] = module             # <<<<<<<<<<<<<<
 * 
 *         return module
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_modules); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_fullname, __pyx_v_module) < 0)) __PYX_ERR(0, 4052, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":4054
 *         _sys.modules[fullname] = module
 * 
 *         return module             # <<<<<<<<<<<<<<
 * 
 * class _Importer:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_module);
  __pyx_r = __pyx_v_module;
  goto __pyx_L0;

  /* "capnp/lib/capnp.pyx":4044
 *         self.additional_paths = additional_paths
 * 
 *     def load_module(self, fullname):             # <<<<<<<<<<<<<<
 *         assert self.fullname == fullname, (
 *             "invalid module, expected %s, got %s" % (
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("capnp.lib.capnp._Loader.load_module", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_imports);
  __Pyx_XDECREF(__pyx_v_module);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":4057
 * 
 * class _Importer:
 *     def __init__(self, additional_paths):             # <<<<<<<<<<<<<<
 *         self.extension = '.capnp'
 *         self.additional_paths = additional_paths
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_9_Importer_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_9_Importer___init__[] = "_Importer.__init__(self, additional_paths)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_9_Importer_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_9_Importer_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_9_Importer___init__};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_9_Importer_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_additional_paths = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_additional_paths,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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_paths)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 4057, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 4057, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_additional_paths = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4057, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Importer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_9_Importer___init__(__pyx_self, __pyx_v_self, __pyx_v_additional_paths);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_9_Importer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_additional_paths) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "capnp/lib/capnp.pyx":4058
 * class _Importer:
 *     def __init__(self, additional_paths):
 *         self.extension = '.capnp'             # <<<<<<<<<<<<<<
 *         self.additional_paths = additional_paths
 *     def find_module(self, fullname, package_path=None):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extension, __pyx_kp_s_capnp) < 0) __PYX_ERR(0, 4058, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4059
 *     def __init__(self, additional_paths):
 *         self.extension = '.capnp'
 *         self.additional_paths = additional_paths             # <<<<<<<<<<<<<<
 *     def find_module(self, fullname, package_path=None):
 *         if fullname in _sys.modules: # Don't allow re-imports
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_additional_paths, __pyx_v_additional_paths) < 0) __PYX_ERR(0, 4059, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4057
 * 
 * class _Importer:
 *     def __init__(self, additional_paths):             # <<<<<<<<<<<<<<
 *         self.extension = '.capnp'
 *         self.additional_paths = additional_paths
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Importer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":4060
 *         self.extension = '.capnp'
 *         self.additional_paths = additional_paths
 *     def find_module(self, fullname, package_path=None):             # <<<<<<<<<<<<<<
 *         if fullname in _sys.modules: # Don't allow re-imports
 *             return None
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_9_Importer_3find_module(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_9_Importer_2find_module[] = "_Importer.find_module(self, fullname, package_path=None)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_9_Importer_3find_module = {"find_module", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_9_Importer_3find_module, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_9_Importer_2find_module};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_9_Importer_3find_module(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_fullname = 0;
  PyObject *__pyx_v_package_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("find_module (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_fullname,&__pyx_n_s_package_path,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fullname)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("find_module", 0, 2, 3, 1); __PYX_ERR(0, 4060, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_package_path);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find_module") < 0)) __PYX_ERR(0, 4060, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_fullname = values[1];
    __pyx_v_package_path = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("find_module", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4060, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp._Importer.find_module", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_9_Importer_2find_module(__pyx_self, __pyx_v_self, __pyx_v_fullname, __pyx_v_package_path);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_9_Importer_2find_module(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fullname, PyObject *__pyx_v_package_path) {
  PyObject *__pyx_v_mod_parts = NULL;
  PyObject *__pyx_v_module_name = NULL;
  PyObject *__pyx_v_capnp_module_name = NULL;
  int __pyx_v_has_underscores;
  PyObject *__pyx_v_capnp_module_name_dashes = NULL;
  PyObject *__pyx_v_capnp_module_name_spaces = NULL;
  PyObject *__pyx_v_paths = NULL;
  PyObject *__pyx_v_join_path = NULL;
  PyObject *__pyx_v_is_file = NULL;
  PyObject *__pyx_v_is_abs = NULL;
  PyObject *__pyx_v_abspath = NULL;
  PyObject *__pyx_v_sep = NULL;
  PyObject *__pyx_v_path = 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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("find_module", 0);

  /* "capnp/lib/capnp.pyx":4061
 *         self.additional_paths = additional_paths
 *     def find_module(self, fullname, package_path=None):
 *         if fullname in _sys.modules: # Don't allow re-imports             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_modules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_fullname, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (__pyx_t_3 != 0);
  if (__pyx_t_4) {

    /* "capnp/lib/capnp.pyx":4062
 *     def find_module(self, fullname, package_path=None):
 *         if fullname in _sys.modules: # Don't allow re-imports
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         if '.' in fullname: # only when package_path anyway?
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":4061
 *         self.additional_paths = additional_paths
 *     def find_module(self, fullname, package_path=None):
 *         if fullname in _sys.modules: # Don't allow re-imports             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":4064
 *             return None
 * 
 *         if '.' in fullname: # only when package_path anyway?             # <<<<<<<<<<<<<<
 *             mod_parts = fullname.split('.')
 *             module_name = mod_parts[-1]
 */
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__133, __pyx_v_fullname, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4064, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":4065
 * 
 *         if '.' in fullname: # only when package_path anyway?
 *             mod_parts = fullname.split('.')             # <<<<<<<<<<<<<<
 *             module_name = mod_parts[-1]
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fullname, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_kp_s__133) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_s__133);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_mod_parts = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":4066
 *         if '.' in fullname: # only when package_path anyway?
 *             mod_parts = fullname.split('.')
 *             module_name = mod_parts[-1]             # <<<<<<<<<<<<<<
 *         else:
 *             module_name = fullname
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_mod_parts, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_module_name = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":4064
 *             return None
 * 
 *         if '.' in fullname: # only when package_path anyway?             # <<<<<<<<<<<<<<
 *             mod_parts = fullname.split('.')
 *             module_name = mod_parts[-1]
 */
    goto __pyx_L4;
  }

  /* "capnp/lib/capnp.pyx":4068
 *             module_name = mod_parts[-1]
 *         else:
 *             module_name = fullname             # <<<<<<<<<<<<<<
 * 
 *         if not module_name.endswith('_capnp'):
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_fullname);
    __pyx_v_module_name = __pyx_v_fullname;
  }
  __pyx_L4:;

  /* "capnp/lib/capnp.pyx":4070
 *             module_name = fullname
 * 
 *         if not module_name.endswith('_capnp'):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_module_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_n_s_capnp_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_s_capnp_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4070, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = ((!__pyx_t_3) != 0);
  if (__pyx_t_4) {

    /* "capnp/lib/capnp.pyx":4071
 * 
 *         if not module_name.endswith('_capnp'):
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         module_name = module_name[:-len('_capnp')]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "capnp/lib/capnp.pyx":4070
 *             module_name = fullname
 * 
 *         if not module_name.endswith('_capnp'):             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":4073
 *             return None
 * 
 *         module_name = module_name[:-len('_capnp')]             # <<<<<<<<<<<<<<
 *         capnp_module_name = module_name + self.extension
 *         has_underscores = False
 */
  __pyx_t_6 = PyObject_Length(__pyx_n_s_capnp_2); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4073, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_module_name, 0, (-__pyx_t_6), NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_module_name, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4074
 * 
 *         module_name = module_name[:-len('_capnp')]
 *         capnp_module_name = module_name + self.extension             # <<<<<<<<<<<<<<
 *         has_underscores = False
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_Add(__pyx_v_module_name, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_capnp_module_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4075
 *         module_name = module_name[:-len('_capnp')]
 *         capnp_module_name = module_name + self.extension
 *         has_underscores = False             # <<<<<<<<<<<<<<
 * 
 *         if '_' in capnp_module_name:
 */
  __pyx_v_has_underscores = 0;

  /* "capnp/lib/capnp.pyx":4077
 *         has_underscores = False
 * 
 *         if '_' in capnp_module_name:             # <<<<<<<<<<<<<<
 *             capnp_module_name_dashes = capnp_module_name.replace('_', '-')
 *             capnp_module_name_spaces = capnp_module_name.replace('_', ' ')
 */
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_n_s__134, __pyx_v_capnp_module_name, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4077, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_4 != 0);
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":4078
 * 
 *         if '_' in capnp_module_name:
 *             capnp_module_name_dashes = capnp_module_name.replace('_', '-')             # <<<<<<<<<<<<<<
 *             capnp_module_name_spaces = capnp_module_name.replace('_', ' ')
 *             has_underscores = True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_capnp_module_name, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_capnp_module_name_dashes = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":4079
 *         if '_' in capnp_module_name:
 *             capnp_module_name_dashes = capnp_module_name.replace('_', '-')
 *             capnp_module_name_spaces = capnp_module_name.replace('_', ' ')             # <<<<<<<<<<<<<<
 *             has_underscores = True
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_capnp_module_name, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_capnp_module_name_spaces = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":4080
 *             capnp_module_name_dashes = capnp_module_name.replace('_', '-')
 *             capnp_module_name_spaces = capnp_module_name.replace('_', ' ')
 *             has_underscores = True             # <<<<<<<<<<<<<<
 * 
 *         if package_path:
 */
    __pyx_v_has_underscores = 1;

    /* "capnp/lib/capnp.pyx":4077
 *         has_underscores = False
 * 
 *         if '_' in capnp_module_name:             # <<<<<<<<<<<<<<
 *             capnp_module_name_dashes = capnp_module_name.replace('_', '-')
 *             capnp_module_name_spaces = capnp_module_name.replace('_', ' ')
 */
  }

  /* "capnp/lib/capnp.pyx":4082
 *             has_underscores = True
 * 
 *         if package_path:             # <<<<<<<<<<<<<<
 *             paths = list(package_path)
 *         else:
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_package_path); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4082, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":4083
 * 
 *         if package_path:
 *             paths = list(package_path)             # <<<<<<<<<<<<<<
 *         else:
 *             paths = _sys.path
 */
    __pyx_t_1 = PySequence_List(__pyx_v_package_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_paths = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":4082
 *             has_underscores = True
 * 
 *         if package_path:             # <<<<<<<<<<<<<<
 *             paths = list(package_path)
 *         else:
 */
    goto __pyx_L7;
  }

  /* "capnp/lib/capnp.pyx":4085
 *             paths = list(package_path)
 *         else:
 *             paths = _sys.path             # <<<<<<<<<<<<<<
 *         join_path = _os.path.join
 *         is_file = _os.path.isfile
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_paths = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L7:;

  /* "capnp/lib/capnp.pyx":4086
 *         else:
 *             paths = _sys.path
 *         join_path = _os.path.join             # <<<<<<<<<<<<<<
 *         is_file = _os.path.isfile
 *         is_abs = _os.path.isabs
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_join); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_join_path = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4087
 *             paths = _sys.path
 *         join_path = _os.path.join
 *         is_file = _os.path.isfile             # <<<<<<<<<<<<<<
 *         is_abs = _os.path.isabs
 *         abspath = _os.path.abspath
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_is_file = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4088
 *         join_path = _os.path.join
 *         is_file = _os.path.isfile
 *         is_abs = _os.path.isabs             # <<<<<<<<<<<<<<
 *         abspath = _os.path.abspath
 *         #is_dir = os.path.isdir
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isabs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_is_abs = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4089
 *         is_file = _os.path.isfile
 *         is_abs = _os.path.isabs
 *         abspath = _os.path.abspath             # <<<<<<<<<<<<<<
 *         #is_dir = os.path.isdir
 *         sep = _os.path.sep
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_abspath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_abspath = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4091
 *         abspath = _os.path.abspath
 *         #is_dir = os.path.isdir
 *         sep = _os.path.sep             # <<<<<<<<<<<<<<
 * 
 *         paths = self.additional_paths + paths
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sep); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sep = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4093
 *         sep = _os.path.sep
 * 
 *         paths = self.additional_paths + paths             # <<<<<<<<<<<<<<
 *         for path in paths:
 *             if not path:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_additional_paths); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_v_paths); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_paths, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4094
 * 
 *         paths = self.additional_paths + paths
 *         for path in paths:             # <<<<<<<<<<<<<<
 *             if not path:
 *                 path = _os.getcwd()
 */
  if (likely(PyList_CheckExact(__pyx_v_paths)) || PyTuple_CheckExact(__pyx_v_paths)) {
    __pyx_t_1 = __pyx_v_paths; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_paths); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4094, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_7)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 4094, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 4094, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_7(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 4094, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":4095
 *         paths = self.additional_paths + paths
 *         for path in paths:
 *             if not path:             # <<<<<<<<<<<<<<
 *                 path = _os.getcwd()
 *             elif not is_abs(path):
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_path); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4095, __pyx_L1_error)
    __pyx_t_4 = ((!__pyx_t_3) != 0);
    if (__pyx_t_4) {

      /* "capnp/lib/capnp.pyx":4096
 *         for path in paths:
 *             if not path:
 *                 path = _os.getcwd()             # <<<<<<<<<<<<<<
 *             elif not is_abs(path):
 *                 path = abspath(path)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getcwd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "capnp/lib/capnp.pyx":4095
 *         paths = self.additional_paths + paths
 *         for path in paths:
 *             if not path:             # <<<<<<<<<<<<<<
 *                 path = _os.getcwd()
 *             elif not is_abs(path):
 */
      goto __pyx_L10;
    }

    /* "capnp/lib/capnp.pyx":4097
 *             if not path:
 *                 path = _os.getcwd()
 *             elif not is_abs(path):             # <<<<<<<<<<<<<<
 *                 path = abspath(path)
 * 
 */
    __Pyx_INCREF(__pyx_v_is_abs);
    __pyx_t_8 = __pyx_v_is_abs; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_path);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 4097, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = ((!__pyx_t_4) != 0);
    if (__pyx_t_3) {

      /* "capnp/lib/capnp.pyx":4098
 *                 path = _os.getcwd()
 *             elif not is_abs(path):
 *                 path = abspath(path)             # <<<<<<<<<<<<<<
 * 
 *             if is_file(path+sep+capnp_module_name):
 */
      __Pyx_INCREF(__pyx_v_abspath);
      __pyx_t_8 = __pyx_v_abspath; __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
        }
      }
      __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_path);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "capnp/lib/capnp.pyx":4097
 *             if not path:
 *                 path = _os.getcwd()
 *             elif not is_abs(path):             # <<<<<<<<<<<<<<
 *                 path = abspath(path)
 * 
 */
    }
    __pyx_L10:;

    /* "capnp/lib/capnp.pyx":4100
 *                 path = abspath(path)
 * 
 *             if is_file(path+sep+capnp_module_name):             # <<<<<<<<<<<<<<
 *                 return _Loader(fullname, join_path(path, capnp_module_name), self.additional_paths)
 *             if has_underscores:
 */
    __pyx_t_8 = PyNumber_Add(__pyx_v_path, __pyx_v_sep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyNumber_Add(__pyx_t_8, __pyx_v_capnp_module_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_INCREF(__pyx_v_is_file);
    __pyx_t_8 = __pyx_v_is_file; __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4100, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "capnp/lib/capnp.pyx":4101
 * 
 *             if is_file(path+sep+capnp_module_name):
 *                 return _Loader(fullname, join_path(path, capnp_module_name), self.additional_paths)             # <<<<<<<<<<<<<<
 *             if has_underscores:
 *                 if is_file(path+sep+capnp_module_name_dashes):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Loader); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_join_path);
      __pyx_t_9 = __pyx_v_join_path; __pyx_t_10 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_path, __pyx_v_capnp_module_name};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4101, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_path, __pyx_v_capnp_module_name};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4101, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else
      #endif
      {
        __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (__pyx_t_10) {
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
        }
        __Pyx_INCREF(__pyx_v_path);
        __Pyx_GIVEREF(__pyx_v_path);
        PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_path);
        __Pyx_INCREF(__pyx_v_capnp_module_name);
        __Pyx_GIVEREF(__pyx_v_capnp_module_name);
        PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_capnp_module_name);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_additional_paths); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_12 = NULL;
      __pyx_t_11 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_11 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_fullname, __pyx_t_5, __pyx_t_9};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4101, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_fullname, __pyx_t_5, __pyx_t_9};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4101, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_12) {
          __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
        }
        __Pyx_INCREF(__pyx_v_fullname);
        __Pyx_GIVEREF(__pyx_v_fullname);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_11, __pyx_v_fullname);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_11, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_11, __pyx_t_9);
        __pyx_t_5 = 0;
        __pyx_t_9 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "capnp/lib/capnp.pyx":4100
 *                 path = abspath(path)
 * 
 *             if is_file(path+sep+capnp_module_name):             # <<<<<<<<<<<<<<
 *                 return _Loader(fullname, join_path(path, capnp_module_name), self.additional_paths)
 *             if has_underscores:
 */
    }

    /* "capnp/lib/capnp.pyx":4102
 *             if is_file(path+sep+capnp_module_name):
 *                 return _Loader(fullname, join_path(path, capnp_module_name), self.additional_paths)
 *             if has_underscores:             # <<<<<<<<<<<<<<
 *                 if is_file(path+sep+capnp_module_name_dashes):
 *                     return _Loader(fullname, join_path(path, capnp_module_name_dashes), self.additional_paths)
 */
    __pyx_t_3 = (__pyx_v_has_underscores != 0);
    if (__pyx_t_3) {

      /* "capnp/lib/capnp.pyx":4103
 *                 return _Loader(fullname, join_path(path, capnp_module_name), self.additional_paths)
 *             if has_underscores:
 *                 if is_file(path+sep+capnp_module_name_dashes):             # <<<<<<<<<<<<<<
 *                     return _Loader(fullname, join_path(path, capnp_module_name_dashes), self.additional_paths)
 *                 if is_file(path+sep+capnp_module_name_spaces):
 */
      __pyx_t_8 = PyNumber_Add(__pyx_v_path, __pyx_v_sep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (unlikely(!__pyx_v_capnp_module_name_dashes)) { __Pyx_RaiseUnboundLocalError("capnp_module_name_dashes"); __PYX_ERR(0, 4103, __pyx_L1_error) }
      __pyx_t_10 = PyNumber_Add(__pyx_t_8, __pyx_v_capnp_module_name_dashes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_v_is_file);
      __pyx_t_8 = __pyx_v_is_file; __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && 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);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4103, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_3) {

        /* "capnp/lib/capnp.pyx":4104
 *             if has_underscores:
 *                 if is_file(path+sep+capnp_module_name_dashes):
 *                     return _Loader(fullname, join_path(path, capnp_module_name_dashes), self.additional_paths)             # <<<<<<<<<<<<<<
 *                 if is_file(path+sep+capnp_module_name_spaces):
 *                     return _Loader(fullname, join_path(path, capnp_module_name_spaces), self.additional_paths)
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Loader); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(!__pyx_v_capnp_module_name_dashes)) { __Pyx_RaiseUnboundLocalError("capnp_module_name_dashes"); __PYX_ERR(0, 4104, __pyx_L1_error) }
        __Pyx_INCREF(__pyx_v_join_path);
        __pyx_t_9 = __pyx_v_join_path; __pyx_t_5 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_path, __pyx_v_capnp_module_name_dashes};
          __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4104, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_10);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_path, __pyx_v_capnp_module_name_dashes};
          __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4104, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_10);
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_path);
          __Pyx_INCREF(__pyx_v_capnp_module_name_dashes);
          __Pyx_GIVEREF(__pyx_v_capnp_module_name_dashes);
          PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_capnp_module_name_dashes);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_additional_paths); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_fullname, __pyx_t_10, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4104, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_fullname, __pyx_t_10, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4104, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_12); __pyx_t_12 = NULL;
          }
          __Pyx_INCREF(__pyx_v_fullname);
          __Pyx_GIVEREF(__pyx_v_fullname);
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_11, __pyx_v_fullname);
          __Pyx_GIVEREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_11, __pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_11, __pyx_t_9);
          __pyx_t_10 = 0;
          __pyx_t_9 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "capnp/lib/capnp.pyx":4103
 *                 return _Loader(fullname, join_path(path, capnp_module_name), self.additional_paths)
 *             if has_underscores:
 *                 if is_file(path+sep+capnp_module_name_dashes):             # <<<<<<<<<<<<<<
 *                     return _Loader(fullname, join_path(path, capnp_module_name_dashes), self.additional_paths)
 *                 if is_file(path+sep+capnp_module_name_spaces):
 */
      }

      /* "capnp/lib/capnp.pyx":4105
 *                 if is_file(path+sep+capnp_module_name_dashes):
 *                     return _Loader(fullname, join_path(path, capnp_module_name_dashes), self.additional_paths)
 *                 if is_file(path+sep+capnp_module_name_spaces):             # <<<<<<<<<<<<<<
 *                     return _Loader(fullname, join_path(path, capnp_module_name_spaces), self.additional_paths)
 * 
 */
      __pyx_t_8 = PyNumber_Add(__pyx_v_path, __pyx_v_sep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4105, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (unlikely(!__pyx_v_capnp_module_name_spaces)) { __Pyx_RaiseUnboundLocalError("capnp_module_name_spaces"); __PYX_ERR(0, 4105, __pyx_L1_error) }
      __pyx_t_5 = PyNumber_Add(__pyx_t_8, __pyx_v_capnp_module_name_spaces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4105, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_v_is_file);
      __pyx_t_8 = __pyx_v_is_file; __pyx_t_9 = NULL;
      if (CYTHON_UNPACK_METHODS && 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);
        }
      }
      __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4105, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4105, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_3) {

        /* "capnp/lib/capnp.pyx":4106
 *                     return _Loader(fullname, join_path(path, capnp_module_name_dashes), self.additional_paths)
 *                 if is_file(path+sep+capnp_module_name_spaces):
 *                     return _Loader(fullname, join_path(path, capnp_module_name_spaces), self.additional_paths)             # <<<<<<<<<<<<<<
 * 
 * _importer = None
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Loader); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(!__pyx_v_capnp_module_name_spaces)) { __Pyx_RaiseUnboundLocalError("capnp_module_name_spaces"); __PYX_ERR(0, 4106, __pyx_L1_error) }
        __Pyx_INCREF(__pyx_v_join_path);
        __pyx_t_9 = __pyx_v_join_path; __pyx_t_10 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_path, __pyx_v_capnp_module_name_spaces};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4106, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_path, __pyx_v_capnp_module_name_spaces};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4106, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__pyx_t_10) {
            __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
          }
          __Pyx_INCREF(__pyx_v_path);
          __Pyx_GIVEREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_path);
          __Pyx_INCREF(__pyx_v_capnp_module_name_spaces);
          __Pyx_GIVEREF(__pyx_v_capnp_module_name_spaces);
          PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_capnp_module_name_spaces);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_additional_paths); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = NULL;
        __pyx_t_11 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_11 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_fullname, __pyx_t_5, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4106, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[4] = {__pyx_t_12, __pyx_v_fullname, __pyx_t_5, __pyx_t_9};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4106, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        {
          __pyx_t_10 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
          }
          __Pyx_INCREF(__pyx_v_fullname);
          __Pyx_GIVEREF(__pyx_v_fullname);
          PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_11, __pyx_v_fullname);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_11, __pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_11, __pyx_t_9);
          __pyx_t_5 = 0;
          __pyx_t_9 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4106, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "capnp/lib/capnp.pyx":4105
 *                 if is_file(path+sep+capnp_module_name_dashes):
 *                     return _Loader(fullname, join_path(path, capnp_module_name_dashes), self.additional_paths)
 *                 if is_file(path+sep+capnp_module_name_spaces):             # <<<<<<<<<<<<<<
 *                     return _Loader(fullname, join_path(path, capnp_module_name_spaces), self.additional_paths)
 * 
 */
      }

      /* "capnp/lib/capnp.pyx":4102
 *             if is_file(path+sep+capnp_module_name):
 *                 return _Loader(fullname, join_path(path, capnp_module_name), self.additional_paths)
 *             if has_underscores:             # <<<<<<<<<<<<<<
 *                 if is_file(path+sep+capnp_module_name_dashes):
 *                     return _Loader(fullname, join_path(path, capnp_module_name_dashes), self.additional_paths)
 */
    }

    /* "capnp/lib/capnp.pyx":4094
 * 
 *         paths = self.additional_paths + paths
 *         for path in paths:             # <<<<<<<<<<<<<<
 *             if not path:
 *                 path = _os.getcwd()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4060
 *         self.extension = '.capnp'
 *         self.additional_paths = additional_paths
 *     def find_module(self, fullname, package_path=None):             # <<<<<<<<<<<<<<
 *         if fullname in _sys.modules: # Don't allow re-imports
 *             return None
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("capnp.lib.capnp._Importer.find_module", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mod_parts);
  __Pyx_XDECREF(__pyx_v_module_name);
  __Pyx_XDECREF(__pyx_v_capnp_module_name);
  __Pyx_XDECREF(__pyx_v_capnp_module_name_dashes);
  __Pyx_XDECREF(__pyx_v_capnp_module_name_spaces);
  __Pyx_XDECREF(__pyx_v_paths);
  __Pyx_XDECREF(__pyx_v_join_path);
  __Pyx_XDECREF(__pyx_v_is_file);
  __Pyx_XDECREF(__pyx_v_is_abs);
  __Pyx_XDECREF(__pyx_v_abspath);
  __Pyx_XDECREF(__pyx_v_sep);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":4110
 * _importer = None
 * 
 * def add_import_hook(additional_paths=[]):             # <<<<<<<<<<<<<<
 *     """Add a hook to the python import system, so that Cap'n Proto modules are directly importable
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33add_import_hook(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_32add_import_hook[] = "add_import_hook(additional_paths=[])\nAdd a hook to the python import system, so that Cap'n Proto modules are directly importable\n\n    After calling this function, you can use the python import syntax to directly import capnproto schemas. This function is automatically called upon first import of `capnp`, so you will typically never need to use this function.::\n\n        import capnp\n        capnp.add_import_hook()\n\n        import addressbook_capnp\n        # equivalent to capnp.load('addressbook.capnp', 'addressbook', sys.path), except it will search for 'addressbook.capnp' in all directories of sys.path\n\n    :type additional_paths: list\n    :param additional_paths: Additional paths, listed as strings, to be used to search for the .capnp files. It is prepended to the beginning of sys.path. It also affects imports inside of Cap'n Proto schemas.\n    ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_33add_import_hook = {"add_import_hook", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_33add_import_hook, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_32add_import_hook};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_33add_import_hook(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_additional_paths = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_import_hook (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_additional_paths,0};
    PyObject* values[1] = {0};
    values[0] = __pyx_k__139;
    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);
        CYTHON_FALLTHROUGH;
        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 = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_additional_paths);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_import_hook") < 0)) __PYX_ERR(0, 4110, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_additional_paths = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_import_hook", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 4110, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.add_import_hook", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_32add_import_hook(__pyx_self, __pyx_v_additional_paths);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_32add_import_hook(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_additional_paths) {
  PyObject *__pyx_v_extra_paths = NULL;
  PyObject *__pyx_v_path = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  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("add_import_hook", 0);

  /* "capnp/lib/capnp.pyx":4125
 *     """
 *     global _importer
 *     if _importer is not None:             # <<<<<<<<<<<<<<
 *         remove_import_hook()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_importer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":4126
 *     global _importer
 *     if _importer is not None:
 *         remove_import_hook()             # <<<<<<<<<<<<<<
 * 
 *     # Automatically include the system and built-in capnp paths
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_remove_import_hook); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4126, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4126, __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;

    /* "capnp/lib/capnp.pyx":4125
 *     """
 *     global _importer
 *     if _importer is not None:             # <<<<<<<<<<<<<<
 *         remove_import_hook()
 * 
 */
  }

  /* "capnp/lib/capnp.pyx":4131
 *     # Highest priority at position 0
 *     extra_paths = [
 *         _os.path.join(_os.path.dirname(__file__), '..'), # Built-in (only used if bundled)             # <<<<<<<<<<<<<<
 *         # Common macOS brew location
 *         '/usr/local/include/capnp',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_dirname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_file_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
    }
  }
  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && 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_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_kp_s__140};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4131, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_kp_s__140};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4131, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_t_5);
    __Pyx_INCREF(__pyx_kp_s__140);
    __Pyx_GIVEREF(__pyx_kp_s__140);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_kp_s__140);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":4130
 *     # Automatically include the system and built-in capnp paths
 *     # Highest priority at position 0
 *     extra_paths = [             # <<<<<<<<<<<<<<
 *         _os.path.join(_os.path.dirname(__file__), '..'), # Built-in (only used if bundled)
 *         # Common macOS brew location
 */
  __pyx_t_4 = PyList_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_INCREF(__pyx_kp_s_usr_local_include_capnp);
  __Pyx_GIVEREF(__pyx_kp_s_usr_local_include_capnp);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_usr_local_include_capnp);
  __Pyx_INCREF(__pyx_kp_s_usr_local_include);
  __Pyx_GIVEREF(__pyx_kp_s_usr_local_include);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_kp_s_usr_local_include);
  __Pyx_INCREF(__pyx_kp_s_usr_include_capnp);
  __Pyx_GIVEREF(__pyx_kp_s_usr_include_capnp);
  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_kp_s_usr_include_capnp);
  __Pyx_INCREF(__pyx_kp_s_usr_include);
  __Pyx_GIVEREF(__pyx_kp_s_usr_include);
  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_kp_s_usr_include);
  __pyx_t_1 = 0;
  __pyx_v_extra_paths = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":4139
 *         '/usr/include',
 *     ]
 *     for path in extra_paths:             # <<<<<<<<<<<<<<
 *         if _os.path.isdir(path):
 *             if path not in additional_paths:
 */
  __pyx_t_4 = __pyx_v_extra_paths; __Pyx_INCREF(__pyx_t_4); __pyx_t_10 = 0;
  for (;;) {
    if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_4)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 4139, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "capnp/lib/capnp.pyx":4140
 *     ]
 *     for path in extra_paths:
 *         if _os.path.isdir(path):             # <<<<<<<<<<<<<<
 *             if path not in additional_paths:
 *                 additional_paths.append(path)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isdir); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_path);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4140, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4140, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "capnp/lib/capnp.pyx":4141
 *     for path in extra_paths:
 *         if _os.path.isdir(path):
 *             if path not in additional_paths:             # <<<<<<<<<<<<<<
 *                 additional_paths.append(path)
 * 
 */
      __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_path, __pyx_v_additional_paths, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 4141, __pyx_L1_error)
      __pyx_t_2 = (__pyx_t_3 != 0);
      if (__pyx_t_2) {

        /* "capnp/lib/capnp.pyx":4142
 *         if _os.path.isdir(path):
 *             if path not in additional_paths:
 *                 additional_paths.append(path)             # <<<<<<<<<<<<<<
 * 
 *     _importer = _Importer(additional_paths)
 */
        __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_additional_paths, __pyx_v_path); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 4142, __pyx_L1_error)

        /* "capnp/lib/capnp.pyx":4141
 *     for path in extra_paths:
 *         if _os.path.isdir(path):
 *             if path not in additional_paths:             # <<<<<<<<<<<<<<
 *                 additional_paths.append(path)
 * 
 */
      }

      /* "capnp/lib/capnp.pyx":4140
 *     ]
 *     for path in extra_paths:
 *         if _os.path.isdir(path):             # <<<<<<<<<<<<<<
 *             if path not in additional_paths:
 *                 additional_paths.append(path)
 */
    }

    /* "capnp/lib/capnp.pyx":4139
 *         '/usr/include',
 *     ]
 *     for path in extra_paths:             # <<<<<<<<<<<<<<
 *         if _os.path.isdir(path):
 *             if path not in additional_paths:
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":4144
 *                 additional_paths.append(path)
 * 
 *     _importer = _Importer(additional_paths)             # <<<<<<<<<<<<<<
 *     _sys.meta_path.append(_importer)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Importer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_v_additional_paths) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_additional_paths);
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_importer, __pyx_t_4) < 0) __PYX_ERR(0, 4144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":4145
 * 
 *     _importer = _Importer(additional_paths)
 *     _sys.meta_path.append(_importer)             # <<<<<<<<<<<<<<
 * 
 * def remove_import_hook():
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_meta_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_importer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_4); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 4145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "capnp/lib/capnp.pyx":4110
 * _importer = None
 * 
 * def add_import_hook(additional_paths=[]):             # <<<<<<<<<<<<<<
 *     """Add a hook to the python import system, so that Cap'n Proto modules are directly importable
 * 
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("capnp.lib.capnp.add_import_hook", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_extra_paths);
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":4147
 *     _sys.meta_path.append(_importer)
 * 
 * def remove_import_hook():             # <<<<<<<<<<<<<<
 *     """Remove the import hook, and return python's import to normal"""
 *     global _importer
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_35remove_import_hook(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_34remove_import_hook[] = "remove_import_hook()\nRemove the import hook, and return python's import to normal";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_35remove_import_hook = {"remove_import_hook", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_35remove_import_hook, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_34remove_import_hook};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_35remove_import_hook(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove_import_hook (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_34remove_import_hook(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_34remove_import_hook(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove_import_hook", 0);

  /* "capnp/lib/capnp.pyx":4150
 *     """Remove the import hook, and return python's import to normal"""
 *     global _importer
 *     if _importer is not None:             # <<<<<<<<<<<<<<
 *         _sys.meta_path.remove(_importer)
 *     _importer = None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_importer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "capnp/lib/capnp.pyx":4151
 *     global _importer
 *     if _importer is not None:
 *         _sys.meta_path.remove(_importer)             # <<<<<<<<<<<<<<
 *     _importer = None
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_meta_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_remove_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_importer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && 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_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4151, __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;

    /* "capnp/lib/capnp.pyx":4150
 *     """Remove the import hook, and return python's import to normal"""
 *     global _importer
 *     if _importer is not None:             # <<<<<<<<<<<<<<
 *         _sys.meta_path.remove(_importer)
 *     _importer = None
 */
  }

  /* "capnp/lib/capnp.pyx":4152
 *     if _importer is not None:
 *         _sys.meta_path.remove(_importer)
 *     _importer = None             # <<<<<<<<<<<<<<
 * 
 * def _init_capnp_api():
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_importer, Py_None) < 0) __PYX_ERR(0, 4152, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4147
 *     _sys.meta_path.append(_importer)
 * 
 * def remove_import_hook():             # <<<<<<<<<<<<<<
 *     """Remove the import hook, and return python's import to normal"""
 *     global _importer
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("capnp.lib.capnp.remove_import_hook", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp/lib/capnp.pyx":4154
 *     _importer = None
 * 
 * def _init_capnp_api():             # <<<<<<<<<<<<<<
 *     """ Initialize static function pointers for cdef api functions. """
 *     init_capnp_api()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_37_init_capnp_api(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_36_init_capnp_api[] = "_init_capnp_api()\n Initialize static function pointers for cdef api functions. ";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_37_init_capnp_api = {"_init_capnp_api", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_37_init_capnp_api, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_36_init_capnp_api};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_37_init_capnp_api(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_capnp_api (wrapper)", 0);
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_36_init_capnp_api(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_36_init_capnp_api(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_capnp_api", 0);

  /* "capnp/lib/capnp.pyx":4156
 * def _init_capnp_api():
 *     """ Initialize static function pointers for cdef api functions. """
 *     init_capnp_api()             # <<<<<<<<<<<<<<
 */
  init_capnp_api();

  /* "capnp/lib/capnp.pyx":4154
 *     _importer = None
 * 
 * def _init_capnp_api():             # <<<<<<<<<<<<<<
 *     """ Initialize static function pointers for cdef api functions. """
 *     init_capnp_api()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__DynamicResizableListBuilder(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_39__pyx_unpickle__DynamicResizableListBuilder(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_38__pyx_unpickle__DynamicResizableListBuilder[] = "__pyx_unpickle__DynamicResizableListBuilder(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_39__pyx_unpickle__DynamicResizableListBuilder = {"__pyx_unpickle__DynamicResizableListBuilder", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_39__pyx_unpickle__DynamicResizableListBuilder, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_38__pyx_unpickle__DynamicResizableListBuilder};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_39__pyx_unpickle__DynamicResizableListBuilder(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__DynamicResizableListBuilder (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__DynamicResizableListBuilder", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__DynamicResizableListBuilder", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle__DynamicResizableListBuilder") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__DynamicResizableListBuilder", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__DynamicResizableListBuilder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_38__pyx_unpickle__DynamicResizableListBuilder(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_38__pyx_unpickle__DynamicResizableListBuilder(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__DynamicResizableListBuilder", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x49eb231:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x49eb231 = (_field, _list, _message, _parent, _schema))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x49eb231) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x49eb231:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x49eb231 = (_field, _list, _message, _parent, _schema))" % __pyx_checksum)
 *     __pyx_result = _DynamicResizableListBuilder.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x49eb231:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x49eb231 = (_field, _list, _message, _parent, _schema))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = _DynamicResizableListBuilder.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x49, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x49eb231:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x49eb231 = (_field, _list, _message, _parent, _schema))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x49eb231 = (_field, _list, _message, _parent, _schema))" % __pyx_checksum)
 *     __pyx_result = _DynamicResizableListBuilder.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__DynamicResizableListBuilder__set_state(<_DynamicResizableListBuilder> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicResizableListBuilder), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x49eb231 = (_field, _list, _message, _parent, _schema))" % __pyx_checksum)
 *     __pyx_result = _DynamicResizableListBuilder.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__DynamicResizableListBuilder__set_state(<_DynamicResizableListBuilder> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _DynamicResizableListBuilder.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__DynamicResizableListBuilder__set_state(<_DynamicResizableListBuilder> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicResizableListBuilder__set_state(_DynamicResizableListBuilder __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicResizableListBuilder__set_state(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x49eb231 = (_field, _list, _message, _parent, _schema))" % __pyx_checksum)
 *     __pyx_result = _DynamicResizableListBuilder.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__DynamicResizableListBuilder__set_state(<_DynamicResizableListBuilder> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__DynamicResizableListBuilder__set_state(<_DynamicResizableListBuilder> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__DynamicResizableListBuilder__set_state(_DynamicResizableListBuilder __pyx_result, tuple __pyx_state):
 *     __pyx_result._field = __pyx_state[0]; __pyx_result._list = __pyx_state[1]; __pyx_result._message = __pyx_state[2]; __pyx_result._parent = __pyx_state[3]; __pyx_result._schema = __pyx_state[4]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__DynamicResizableListBuilder(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__DynamicResizableListBuilder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__DynamicResizableListBuilder__set_state(<_DynamicResizableListBuilder> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicResizableListBuilder__set_state(_DynamicResizableListBuilder __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._field = __pyx_state[0]; __pyx_result._list = __pyx_state[1]; __pyx_result._message = __pyx_state[2]; __pyx_result._parent = __pyx_state[3]; __pyx_result._schema = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicResizableListBuilder__set_state(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__DynamicResizableListBuilder__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicResizableListBuilder__set_state(_DynamicResizableListBuilder __pyx_result, tuple __pyx_state):
 *     __pyx_result._field = __pyx_state[0]; __pyx_result._list = __pyx_state[1]; __pyx_result._message = __pyx_state[2]; __pyx_result._parent = __pyx_state[3]; __pyx_result._schema = __pyx_state[4]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_field);
  __Pyx_DECREF(__pyx_v___pyx_result->_field);
  __pyx_v___pyx_result->_field = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_list);
  __Pyx_DECREF(__pyx_v___pyx_result->_list);
  __pyx_v___pyx_result->_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_message);
  __Pyx_DECREF(__pyx_v___pyx_result->_message);
  __pyx_v___pyx_result->_message = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_parent);
  __Pyx_DECREF(__pyx_v___pyx_result->_parent);
  __pyx_v___pyx_result->_parent = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_schema);
  __Pyx_DECREF(__pyx_v___pyx_result->_schema);
  __pyx_v___pyx_result->_schema = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__DynamicResizableListBuilder__set_state(_DynamicResizableListBuilder __pyx_result, tuple __pyx_state):
 *     __pyx_result._field = __pyx_state[0]; __pyx_result._list = __pyx_state[1]; __pyx_result._message = __pyx_state[2]; __pyx_result._parent = __pyx_state[3]; __pyx_result._schema = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 5) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._field = __pyx_state[0]; __pyx_result._list = __pyx_state[1]; __pyx_result._message = __pyx_state[2]; __pyx_result._parent = __pyx_state[3]; __pyx_result._schema = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[5])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __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;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__DynamicResizableListBuilder__set_state(_DynamicResizableListBuilder __pyx_result, tuple __pyx_state):
 *     __pyx_result._field = __pyx_state[0]; __pyx_result._list = __pyx_state[1]; __pyx_result._message = __pyx_state[2]; __pyx_result._parent = __pyx_state[3]; __pyx_result._schema = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[5])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__DynamicResizableListBuilder__set_state(<_DynamicResizableListBuilder> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicResizableListBuilder__set_state(_DynamicResizableListBuilder __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._field = __pyx_state[0]; __pyx_result._list = __pyx_state[1]; __pyx_result._message = __pyx_state[2]; __pyx_result._parent = __pyx_state[3]; __pyx_result._schema = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__DynamicResizableListBuilder__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__DynamicEnumField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_41__pyx_unpickle__DynamicEnumField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_40__pyx_unpickle__DynamicEnumField[] = "__pyx_unpickle__DynamicEnumField(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_41__pyx_unpickle__DynamicEnumField = {"__pyx_unpickle__DynamicEnumField", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_41__pyx_unpickle__DynamicEnumField, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_40__pyx_unpickle__DynamicEnumField};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_41__pyx_unpickle__DynamicEnumField(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__DynamicEnumField (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__DynamicEnumField", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__DynamicEnumField", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle__DynamicEnumField") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__DynamicEnumField", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__DynamicEnumField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_40__pyx_unpickle__DynamicEnumField(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_40__pyx_unpickle__DynamicEnumField(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__DynamicEnumField", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd68195b:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd68195b = (thisptr))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd68195b) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd68195b:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd68195b = (thisptr))" % __pyx_checksum)
 *     __pyx_result = _DynamicEnumField.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xd68195b:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd68195b = (thisptr))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = _DynamicEnumField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd68195b:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd68195b = (thisptr))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd68195b = (thisptr))" % __pyx_checksum)
 *     __pyx_result = _DynamicEnumField.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__DynamicEnumField__set_state(<_DynamicEnumField> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicEnumField), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd68195b = (thisptr))" % __pyx_checksum)
 *     __pyx_result = _DynamicEnumField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__DynamicEnumField__set_state(<_DynamicEnumField> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _DynamicEnumField.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__DynamicEnumField__set_state(<_DynamicEnumField> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicEnumField__set_state(_DynamicEnumField __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicEnumField__set_state(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd68195b = (thisptr))" % __pyx_checksum)
 *     __pyx_result = _DynamicEnumField.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__DynamicEnumField__set_state(<_DynamicEnumField> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__DynamicEnumField__set_state(<_DynamicEnumField> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__DynamicEnumField__set_state(_DynamicEnumField __pyx_result, tuple __pyx_state):
 *     __pyx_result.thisptr = __pyx_state[0]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__DynamicEnumField(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__DynamicEnumField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__DynamicEnumField__set_state(<_DynamicEnumField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicEnumField__set_state(_DynamicEnumField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.thisptr = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicEnumField__set_state(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__DynamicEnumField__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicEnumField__set_state(_DynamicEnumField __pyx_result, tuple __pyx_state):
 *     __pyx_result.thisptr = __pyx_state[0]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->thisptr);
  __Pyx_DECREF(__pyx_v___pyx_result->thisptr);
  __pyx_v___pyx_result->thisptr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__DynamicEnumField__set_state(_DynamicEnumField __pyx_result, tuple __pyx_state):
 *     __pyx_result.thisptr = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.thisptr = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __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;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__DynamicEnumField__set_state(_DynamicEnumField __pyx_result, tuple __pyx_state):
 *     __pyx_result.thisptr = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[1])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__DynamicEnumField__set_state(<_DynamicEnumField> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicEnumField__set_state(_DynamicEnumField __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.thisptr = __pyx_state[0]
 *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__DynamicEnumField__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__MessageSize(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_43__pyx_unpickle__MessageSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_42__pyx_unpickle__MessageSize[] = "__pyx_unpickle__MessageSize(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_43__pyx_unpickle__MessageSize = {"__pyx_unpickle__MessageSize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_43__pyx_unpickle__MessageSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_42__pyx_unpickle__MessageSize};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_43__pyx_unpickle__MessageSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__MessageSize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__MessageSize", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__MessageSize", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle__MessageSize") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__MessageSize", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__MessageSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_42__pyx_unpickle__MessageSize(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_42__pyx_unpickle__MessageSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__MessageSize", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd1d072f:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd1d072f = (cap_count, word_count))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd1d072f) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd1d072f:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd1d072f = (cap_count, word_count))" % __pyx_checksum)
 *     __pyx_result = _MessageSize.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xd1d072f:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd1d072f = (cap_count, word_count))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = _MessageSize.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xd1d072f:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd1d072f = (cap_count, word_count))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd1d072f = (cap_count, word_count))" % __pyx_checksum)
 *     __pyx_result = _MessageSize.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__MessageSize__set_state(<_MessageSize> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MessageSize), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd1d072f = (cap_count, word_count))" % __pyx_checksum)
 *     __pyx_result = _MessageSize.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__MessageSize__set_state(<_MessageSize> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _MessageSize.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__MessageSize__set_state(<_MessageSize> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__MessageSize__set_state(_MessageSize __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__MessageSize__set_state(((struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xd1d072f = (cap_count, word_count))" % __pyx_checksum)
 *     __pyx_result = _MessageSize.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__MessageSize__set_state(<_MessageSize> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__MessageSize__set_state(<_MessageSize> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__MessageSize__set_state(_MessageSize __pyx_result, tuple __pyx_state):
 *     __pyx_result.cap_count = __pyx_state[0]; __pyx_result.word_count = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__MessageSize(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__MessageSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__MessageSize__set_state(<_MessageSize> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__MessageSize__set_state(_MessageSize __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cap_count = __pyx_state[0]; __pyx_result.word_count = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__MessageSize__set_state(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_5capnp_8includes_5types_uint __pyx_t_2;
  uint64_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__MessageSize__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__MessageSize__set_state(_MessageSize __pyx_result, tuple __pyx_state):
 *     __pyx_result.cap_count = __pyx_state[0]; __pyx_result.word_count = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->cap_count = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->word_count = __pyx_t_3;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__MessageSize__set_state(_MessageSize __pyx_result, tuple __pyx_state):
 *     __pyx_result.cap_count = __pyx_state[0]; __pyx_result.word_count = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 > 2) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_4 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != 0);
  __pyx_t_4 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result.cap_count = __pyx_state[0]; __pyx_result.word_count = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__MessageSize__set_state(_MessageSize __pyx_result, tuple __pyx_state):
 *     __pyx_result.cap_count = __pyx_state[0]; __pyx_result.word_count = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__MessageSize__set_state(<_MessageSize> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__MessageSize__set_state(_MessageSize __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cap_count = __pyx_state[0]; __pyx_result.word_count = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__MessageSize__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__DynamicCapabilityServer(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_45__pyx_unpickle__DynamicCapabilityServer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_44__pyx_unpickle__DynamicCapabilityServer[] = "__pyx_unpickle__DynamicCapabilityServer(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_45__pyx_unpickle__DynamicCapabilityServer = {"__pyx_unpickle__DynamicCapabilityServer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_45__pyx_unpickle__DynamicCapabilityServer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_44__pyx_unpickle__DynamicCapabilityServer};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_45__pyx_unpickle__DynamicCapabilityServer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__DynamicCapabilityServer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__DynamicCapabilityServer", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__DynamicCapabilityServer", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle__DynamicCapabilityServer") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__DynamicCapabilityServer", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__DynamicCapabilityServer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_44__pyx_unpickle__DynamicCapabilityServer(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_44__pyx_unpickle__DynamicCapabilityServer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__DynamicCapabilityServer", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x54274ab:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x54274ab = (schema, server))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x54274ab) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x54274ab:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x54274ab = (schema, server))" % __pyx_checksum)
 *     __pyx_result = _DynamicCapabilityServer.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0x54274ab:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x54274ab = (schema, server))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = _DynamicCapabilityServer.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x54, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0x54274ab:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x54274ab = (schema, server))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x54274ab = (schema, server))" % __pyx_checksum)
 *     __pyx_result = _DynamicCapabilityServer.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__DynamicCapabilityServer__set_state(<_DynamicCapabilityServer> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x54274ab = (schema, server))" % __pyx_checksum)
 *     __pyx_result = _DynamicCapabilityServer.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__DynamicCapabilityServer__set_state(<_DynamicCapabilityServer> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _DynamicCapabilityServer.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__DynamicCapabilityServer__set_state(<_DynamicCapabilityServer> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicCapabilityServer__set_state(_DynamicCapabilityServer __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicCapabilityServer__set_state(((struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0x54274ab = (schema, server))" % __pyx_checksum)
 *     __pyx_result = _DynamicCapabilityServer.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__DynamicCapabilityServer__set_state(<_DynamicCapabilityServer> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__DynamicCapabilityServer__set_state(<_DynamicCapabilityServer> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__DynamicCapabilityServer__set_state(_DynamicCapabilityServer __pyx_result, tuple __pyx_state):
 *     __pyx_result.schema = __pyx_state[0]; __pyx_result.server = __pyx_state[1]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__DynamicCapabilityServer(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__DynamicCapabilityServer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__DynamicCapabilityServer__set_state(<_DynamicCapabilityServer> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicCapabilityServer__set_state(_DynamicCapabilityServer __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.schema = __pyx_state[0]; __pyx_result.server = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__DynamicCapabilityServer__set_state(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__DynamicCapabilityServer__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicCapabilityServer__set_state(_DynamicCapabilityServer __pyx_result, tuple __pyx_state):
 *     __pyx_result.schema = __pyx_state[0]; __pyx_result.server = __pyx_state[1]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->schema);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->schema));
  __pyx_v___pyx_result->schema = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->server);
  __Pyx_DECREF(__pyx_v___pyx_result->server);
  __pyx_v___pyx_result->server = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__DynamicCapabilityServer__set_state(_DynamicCapabilityServer __pyx_result, tuple __pyx_state):
 *     __pyx_result.schema = __pyx_state[0]; __pyx_result.server = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result.schema = __pyx_state[0]; __pyx_result.server = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[2])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __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;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__DynamicCapabilityServer__set_state(_DynamicCapabilityServer __pyx_result, tuple __pyx_state):
 *     __pyx_result.schema = __pyx_state[0]; __pyx_result.server = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[2])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__DynamicCapabilityServer__set_state(<_DynamicCapabilityServer> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicCapabilityServer__set_state(_DynamicCapabilityServer __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.schema = __pyx_state[0]; __pyx_result.server = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__DynamicCapabilityServer__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle__MultipleBytesMessageReader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_5capnp_3lib_5capnp_47__pyx_unpickle__MultipleBytesMessageReader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5capnp_3lib_5capnp_46__pyx_unpickle__MultipleBytesMessageReader[] = "__pyx_unpickle__MultipleBytesMessageReader(__pyx_type, long __pyx_checksum, __pyx_state)";
static PyMethodDef __pyx_mdef_5capnp_3lib_5capnp_47__pyx_unpickle__MultipleBytesMessageReader = {"__pyx_unpickle__MultipleBytesMessageReader", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_47__pyx_unpickle__MultipleBytesMessageReader, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_46__pyx_unpickle__MultipleBytesMessageReader};
static PyObject *__pyx_pw_5capnp_3lib_5capnp_47__pyx_unpickle__MultipleBytesMessageReader(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle__MultipleBytesMessageReader (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__MultipleBytesMessageReader", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__MultipleBytesMessageReader", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle__MultipleBytesMessageReader") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__MultipleBytesMessageReader", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__MultipleBytesMessageReader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5capnp_3lib_5capnp_46__pyx_unpickle__MultipleBytesMessageReader(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5capnp_3lib_5capnp_46__pyx_unpickle__MultipleBytesMessageReader(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__MultipleBytesMessageReader", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xae0c71a:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0c71a = (_object_to_pin, nesting_limit, offset, ptr, schema, sz, traversal_limit_in_words))" % __pyx_checksum)
 */
  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xae0c71a) != 0);
  if (__pyx_t_1) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xae0c71a:
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0c71a = (_object_to_pin, nesting_limit, offset, ptr, schema, sz, traversal_limit_in_words))" % __pyx_checksum)
 *     __pyx_result = _MultipleBytesMessageReader.__new__(__pyx_type)
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_v___pyx_PickleError = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum != 0xae0c71a:
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0c71a = (_object_to_pin, nesting_limit, offset, ptr, schema, sz, traversal_limit_in_words))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = _MultipleBytesMessageReader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xae, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum != 0xae0c71a:             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0c71a = (_object_to_pin, nesting_limit, offset, ptr, schema, sz, traversal_limit_in_words))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0c71a = (_object_to_pin, nesting_limit, offset, ptr, schema, sz, traversal_limit_in_words))" % __pyx_checksum)
 *     __pyx_result = _MultipleBytesMessageReader.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle__MultipleBytesMessageReader__set_state(<_MultipleBytesMessageReader> __pyx_result, __pyx_state)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__MultipleBytesMessageReader), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && 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);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v___pyx_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0c71a = (_object_to_pin, nesting_limit, offset, ptr, schema, sz, traversal_limit_in_words))" % __pyx_checksum)
 *     __pyx_result = _MultipleBytesMessageReader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__MultipleBytesMessageReader__set_state(<_MultipleBytesMessageReader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {

    /* "(tree fragment)":9
 *     __pyx_result = _MultipleBytesMessageReader.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle__MultipleBytesMessageReader__set_state(<_MultipleBytesMessageReader> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle__MultipleBytesMessageReader__set_state(_MultipleBytesMessageReader __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_5capnp_3lib_5capnp___pyx_unpickle__MultipleBytesMessageReader__set_state(((struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (%s vs 0xae0c71a = (_object_to_pin, nesting_limit, offset, ptr, schema, sz, traversal_limit_in_words))" % __pyx_checksum)
 *     __pyx_result = _MultipleBytesMessageReader.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle__MultipleBytesMessageReader__set_state(<_MultipleBytesMessageReader> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle__MultipleBytesMessageReader__set_state(<_MultipleBytesMessageReader> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle__MultipleBytesMessageReader__set_state(_MultipleBytesMessageReader __pyx_result, tuple __pyx_state):
 *     __pyx_result._object_to_pin = __pyx_state[0]; __pyx_result.nesting_limit = __pyx_state[1]; __pyx_result.offset = __pyx_state[2]; __pyx_result.ptr = __pyx_state[3]; __pyx_result.schema = __pyx_state[4]; __pyx_result.sz = __pyx_state[5]; __pyx_result.traversal_limit_in_words = __pyx_state[6]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__MultipleBytesMessageReader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__MultipleBytesMessageReader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle__MultipleBytesMessageReader__set_state(<_MultipleBytesMessageReader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__MultipleBytesMessageReader__set_state(_MultipleBytesMessageReader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._object_to_pin = __pyx_state[0]; __pyx_result.nesting_limit = __pyx_state[1]; __pyx_result.offset = __pyx_state[2]; __pyx_result.ptr = __pyx_state[3]; __pyx_result.schema = __pyx_state[4]; __pyx_result.sz = __pyx_state[5]; __pyx_result.traversal_limit_in_words = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5capnp_3lib_5capnp___pyx_unpickle__MultipleBytesMessageReader__set_state(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  char const *__pyx_t_3;
  int __pyx_t_4;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle__MultipleBytesMessageReader__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle__MultipleBytesMessageReader__set_state(_MultipleBytesMessageReader __pyx_result, tuple __pyx_state):
 *     __pyx_result._object_to_pin = __pyx_state[0]; __pyx_result.nesting_limit = __pyx_state[1]; __pyx_result.offset = __pyx_state[2]; __pyx_result.ptr = __pyx_state[3]; __pyx_result.schema = __pyx_state[4]; __pyx_result.sz = __pyx_state[5]; __pyx_result.traversal_limit_in_words = __pyx_state[6]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_object_to_pin);
  __Pyx_DECREF(__pyx_v___pyx_result->_object_to_pin);
  __pyx_v___pyx_result->_object_to_pin = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->nesting_limit);
  __Pyx_DECREF(__pyx_v___pyx_result->nesting_limit);
  __pyx_v___pyx_result->nesting_limit = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->offset = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_v___pyx_result->ptr = __pyx_t_3;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->schema);
  __Pyx_DECREF(__pyx_v___pyx_result->schema);
  __pyx_v___pyx_result->schema = __pyx_t_1;
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->sz = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->traversal_limit_in_words);
  __Pyx_DECREF(__pyx_v___pyx_result->traversal_limit_in_words);
  __pyx_v___pyx_result->traversal_limit_in_words = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle__MultipleBytesMessageReader__set_state(_MultipleBytesMessageReader __pyx_result, tuple __pyx_state):
 *     __pyx_result._object_to_pin = __pyx_state[0]; __pyx_result.nesting_limit = __pyx_state[1]; __pyx_result.offset = __pyx_state[2]; __pyx_result.ptr = __pyx_state[3]; __pyx_result.schema = __pyx_state[4]; __pyx_result.sz = __pyx_state[5]; __pyx_result.traversal_limit_in_words = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = ((__pyx_t_2 > 7) != 0);
  if (__pyx_t_5) {
  } else {
    __pyx_t_4 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  __pyx_t_4 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_4) {

    /* "(tree fragment)":14
 *     __pyx_result._object_to_pin = __pyx_state[0]; __pyx_result.nesting_limit = __pyx_state[1]; __pyx_result.offset = __pyx_state[2]; __pyx_result.ptr = __pyx_state[3]; __pyx_result.schema = __pyx_state[4]; __pyx_result.sz = __pyx_state[5]; __pyx_result.traversal_limit_in_words = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])             # <<<<<<<<<<<<<<
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && 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);
      }
    }
    __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __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;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle__MultipleBytesMessageReader__set_state(_MultipleBytesMessageReader __pyx_result, tuple __pyx_state):
 *     __pyx_result._object_to_pin = __pyx_state[0]; __pyx_result.nesting_limit = __pyx_state[1]; __pyx_result.offset = __pyx_state[2]; __pyx_result.ptr = __pyx_state[3]; __pyx_result.schema = __pyx_state[4]; __pyx_result.sz = __pyx_state[5]; __pyx_result.traversal_limit_in_words = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle__MultipleBytesMessageReader__set_state(<_MultipleBytesMessageReader> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__MultipleBytesMessageReader__set_state(_MultipleBytesMessageReader __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._object_to_pin = __pyx_state[0]; __pyx_result.nesting_limit = __pyx_state[1]; __pyx_result.offset = __pyx_state[2]; __pyx_result.ptr = __pyx_state[3]; __pyx_result.schema = __pyx_state[4]; __pyx_result.sz = __pyx_state[5]; __pyx_result.traversal_limit_in_words = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("capnp.lib.capnp.__pyx_unpickle__MultipleBytesMessageReader__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "capnp_cpp.pxd":121
 *         VoidPromise afterDelay(Duration delay)
 * 
 * cdef inline Duration Nanoseconds(int64_t nanos):             # <<<<<<<<<<<<<<
 *     return NANOSECONDS * nanos
 * 
 */

static CYTHON_INLINE  ::kj::Duration __pyx_f_5capnp_8includes_9capnp_cpp_Nanoseconds(int64_t __pyx_v_nanos) {
   ::kj::Duration __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Nanoseconds", 0);

  /* "capnp_cpp.pxd":122
 * 
 * cdef inline Duration Nanoseconds(int64_t nanos):
 *     return NANOSECONDS * nanos             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "kj/async-io.h" namespace " ::kj":
 */
  __pyx_r = ( ::kj::NANOSECONDS * __pyx_v_nanos);
  goto __pyx_L0;

  /* "capnp_cpp.pxd":121
 *         VoidPromise afterDelay(Duration delay)
 * 
 * cdef inline Duration Nanoseconds(int64_t nanos):             # <<<<<<<<<<<<<<
 *     return NANOSECONDS * nanos
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "array.pxd":93
 *             __data_union data
 * 
 *         def __getbuffer__(self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fulfill the PEP.
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) {
  PyObject *__pyx_v_item_count = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  char __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "array.pxd":98
 *             # In particular strided access is always provided regardless
 *             # of flags
 *             item_count = Py_SIZE(self)             # <<<<<<<<<<<<<<
 * 
 *             info.suboffsets = NULL
 */
  __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_item_count = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "array.pxd":100
 *             item_count = Py_SIZE(self)
 * 
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.buf = self.data.as_chars
 *             info.readonly = 0
 */
  __pyx_v_info->suboffsets = NULL;

  /* "array.pxd":101
 * 
 *             info.suboffsets = NULL
 *             info.buf = self.data.as_chars             # <<<<<<<<<<<<<<
 *             info.readonly = 0
 *             info.ndim = 1
 */
  __pyx_t_2 = __pyx_v_self->data.as_chars;
  __pyx_v_info->buf = __pyx_t_2;

  /* "array.pxd":102
 *             info.suboffsets = NULL
 *             info.buf = self.data.as_chars
 *             info.readonly = 0             # <<<<<<<<<<<<<<
 *             info.ndim = 1
 *             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)
 */
  __pyx_v_info->readonly = 0;

  /* "array.pxd":103
 *             info.buf = self.data.as_chars
 *             info.readonly = 0
 *             info.ndim = 1             # <<<<<<<<<<<<<<
 *             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)
 *             info.len = info.itemsize * item_count
 */
  __pyx_v_info->ndim = 1;

  /* "array.pxd":104
 *             info.readonly = 0
 *             info.ndim = 1
 *             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)             # <<<<<<<<<<<<<<
 *             info.len = info.itemsize * item_count
 * 
 */
  __pyx_t_3 = __pyx_v_self->ob_descr->itemsize;
  __pyx_v_info->itemsize = __pyx_t_3;

  /* "array.pxd":105
 *             info.ndim = 1
 *             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)
 *             info.len = info.itemsize * item_count             # <<<<<<<<<<<<<<
 * 
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
 */
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_info->len = __pyx_t_5;

  /* "array.pxd":107
 *             info.len = info.itemsize * item_count
 * 
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)             # <<<<<<<<<<<<<<
 *             if not info.shape:
 *                 raise MemoryError()
 */
  __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2)));

  /* "array.pxd":108
 * 
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
 *             if not info.shape:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 *             info.shape[0] = item_count      # constant regardless of resizing
 */
  __pyx_t_6 = ((!(__pyx_v_info->shape != 0)) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "array.pxd":109
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
 *             if not info.shape:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 *             info.shape[0] = item_count      # constant regardless of resizing
 *             info.strides = &info.itemsize
 */
    PyErr_NoMemory(); __PYX_ERR(3, 109, __pyx_L1_error)

    /* "array.pxd":108
 * 
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
 *             if not info.shape:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 *             info.shape[0] = item_count      # constant regardless of resizing
 */
  }

  /* "array.pxd":110
 *             if not info.shape:
 *                 raise MemoryError()
 *             info.shape[0] = item_count      # constant regardless of resizing             # <<<<<<<<<<<<<<
 *             info.strides = &info.itemsize
 * 
 */
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 110, __pyx_L1_error)
  (__pyx_v_info->shape[0]) = __pyx_t_5;

  /* "array.pxd":111
 *                 raise MemoryError()
 *             info.shape[0] = item_count      # constant regardless of resizing
 *             info.strides = &info.itemsize             # <<<<<<<<<<<<<<
 * 
 *             info.format = <char*> (info.shape + 1)
 */
  __pyx_v_info->strides = (&__pyx_v_info->itemsize);

  /* "array.pxd":113
 *             info.strides = &info.itemsize
 * 
 *             info.format = <char*> (info.shape + 1)             # <<<<<<<<<<<<<<
 *             info.format[0] = self.ob_descr.typecode
 *             info.format[1] = 0
 */
  __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1));

  /* "array.pxd":114
 * 
 *             info.format = <char*> (info.shape + 1)
 *             info.format[0] = self.ob_descr.typecode             # <<<<<<<<<<<<<<
 *             info.format[1] = 0
 *             info.obj = self
 */
  __pyx_t_7 = __pyx_v_self->ob_descr->typecode;
  (__pyx_v_info->format[0]) = __pyx_t_7;

  /* "array.pxd":115
 *             info.format = <char*> (info.shape + 1)
 *             info.format[0] = self.ob_descr.typecode
 *             info.format[1] = 0             # <<<<<<<<<<<<<<
 *             info.obj = self
 * 
 */
  (__pyx_v_info->format[1]) = 0;

  /* "array.pxd":116
 *             info.format[0] = self.ob_descr.typecode
 *             info.format[1] = 0
 *             info.obj = self             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(self, Py_buffer* info):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "array.pxd":93
 *             __data_union data
 * 
 *         def __getbuffer__(self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fulfill the PEP.
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_item_count);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "array.pxd":118
 *             info.obj = self
 * 
 *         def __releasebuffer__(self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             PyObject_Free(info.shape)
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* "array.pxd":119
 * 
 *         def __releasebuffer__(self, Py_buffer* info):
 *             PyObject_Free(info.shape)             # <<<<<<<<<<<<<<
 * 
 *     array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr)
 */
  PyObject_Free(__pyx_v_info->shape);

  /* "array.pxd":118
 *             info.obj = self
 * 
 *         def __releasebuffer__(self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             PyObject_Free(info.shape)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "array.pxd":130
 * 
 * 
 * cdef inline array clone(array template, Py_ssize_t length, bint zero):             # <<<<<<<<<<<<<<
 *     """ fast creation of a new array, given a template array.
 *     type will be same as template.
 */

static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) {
  arrayobject *__pyx_v_op = NULL;
  arrayobject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clone", 0);

  /* "array.pxd":134
 *     type will be same as template.
 *     if zero is true, new array will be initialized with zeroes."""
 *     op = newarrayobject(Py_TYPE(template), length, template.ob_descr)             # <<<<<<<<<<<<<<
 *     if zero and op is not None:
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
 */
  __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template)), __pyx_v_length, __pyx_v_template->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_op = ((arrayobject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "array.pxd":135
 *     if zero is true, new array will be initialized with zeroes."""
 *     op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
 *     if zero and op is not None:             # <<<<<<<<<<<<<<
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
 *     return op
 */
  __pyx_t_3 = (__pyx_v_zero != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "array.pxd":136
 *     op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
 *     if zero and op is not None:
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)             # <<<<<<<<<<<<<<
 *     return op
 * 
 */
    (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize)));

    /* "array.pxd":135
 *     if zero is true, new array will be initialized with zeroes."""
 *     op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
 *     if zero and op is not None:             # <<<<<<<<<<<<<<
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
 *     return op
 */
  }

  /* "array.pxd":137
 *     if zero and op is not None:
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
 *     return op             # <<<<<<<<<<<<<<
 * 
 * cdef inline array copy(array self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_op));
  __pyx_r = __pyx_v_op;
  goto __pyx_L0;

  /* "array.pxd":130
 * 
 * 
 * cdef inline array clone(array template, Py_ssize_t length, bint zero):             # <<<<<<<<<<<<<<
 *     """ fast creation of a new array, given a template array.
 *     type will be same as template.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_op);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "array.pxd":139
 *     return op
 * 
 * cdef inline array copy(array self):             # <<<<<<<<<<<<<<
 *     """ make a copy of an array. """
 *     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
 */

static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
  arrayobject *__pyx_v_op = NULL;
  arrayobject *__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("copy", 0);

  /* "array.pxd":141
 * cdef inline array copy(array self):
 *     """ make a copy of an array. """
 *     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)             # <<<<<<<<<<<<<<
 *     memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
 *     return op
 */
  __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self)), Py_SIZE(((PyObject *)__pyx_v_self)), __pyx_v_self->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_op = ((arrayobject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "array.pxd":142
 *     """ make a copy of an array. """
 *     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
 *     memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)             # <<<<<<<<<<<<<<
 *     return op
 * 
 */
  (void)(memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op)) * __pyx_v_op->ob_descr->itemsize)));

  /* "array.pxd":143
 *     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
 *     memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
 *     return op             # <<<<<<<<<<<<<<
 * 
 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_op));
  __pyx_r = __pyx_v_op;
  goto __pyx_L0;

  /* "array.pxd":139
 *     return op
 * 
 * cdef inline array copy(array self):             # <<<<<<<<<<<<<<
 *     """ make a copy of an array. """
 *     op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_op);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "array.pxd":145
 *     return op
 * 
 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:             # <<<<<<<<<<<<<<
 *     """ efficient appending of new stuff of same type
 *     (e.g. of same array type)
 */

static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) {
  Py_ssize_t __pyx_v_itemsize;
  Py_ssize_t __pyx_v_origsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend_buffer", 0);

  /* "array.pxd":149
 *     (e.g. of same array type)
 *     n: number of elements (not number of bytes!) """
 *     cdef Py_ssize_t itemsize = self.ob_descr.itemsize             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t origsize = Py_SIZE(self)
 *     resize_smart(self, origsize + n)
 */
  __pyx_t_1 = __pyx_v_self->ob_descr->itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "array.pxd":150
 *     n: number of elements (not number of bytes!) """
 *     cdef Py_ssize_t itemsize = self.ob_descr.itemsize
 *     cdef Py_ssize_t origsize = Py_SIZE(self)             # <<<<<<<<<<<<<<
 *     resize_smart(self, origsize + n)
 *     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
 */
  __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self));

  /* "array.pxd":151
 *     cdef Py_ssize_t itemsize = self.ob_descr.itemsize
 *     cdef Py_ssize_t origsize = Py_SIZE(self)
 *     resize_smart(self, origsize + n)             # <<<<<<<<<<<<<<
 *     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
 *     return 0
 */
  __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 151, __pyx_L1_error)

  /* "array.pxd":152
 *     cdef Py_ssize_t origsize = Py_SIZE(self)
 *     resize_smart(self, origsize + n)
 *     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  (void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize)));

  /* "array.pxd":153
 *     resize_smart(self, origsize + n)
 *     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * cdef inline int extend(array self, array other) except -1:
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "array.pxd":145
 *     return op
 * 
 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:             # <<<<<<<<<<<<<<
 *     """ efficient appending of new stuff of same type
 *     (e.g. of same array type)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "array.pxd":155
 *     return 0
 * 
 * cdef inline int extend(array self, array other) except -1:             # <<<<<<<<<<<<<<
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:
 */

static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
  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("extend", 0);

  /* "array.pxd":157
 * cdef inline int extend(array self, array other) except -1:
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:             # <<<<<<<<<<<<<<
 *         PyErr_BadArgument()
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 */
  __pyx_t_1 = ((__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode) != 0);
  if (__pyx_t_1) {

    /* "array.pxd":158
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:
 *         PyErr_BadArgument()             # <<<<<<<<<<<<<<
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 * 
 */
    __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(3, 158, __pyx_L1_error)

    /* "array.pxd":157
 * cdef inline int extend(array self, array other) except -1:
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:             # <<<<<<<<<<<<<<
 *         PyErr_BadArgument()
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 */
  }

  /* "array.pxd":159
 *     if self.ob_descr.typecode != other.ob_descr.typecode:
 *         PyErr_BadArgument()
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))             # <<<<<<<<<<<<<<
 * 
 * cdef inline void zero(array self):
 */
  __pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 159, __pyx_L1_error)
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "array.pxd":155
 *     return 0
 * 
 * cdef inline int extend(array self, array other) except -1:             # <<<<<<<<<<<<<<
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "array.pxd":161
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 * 
 * cdef inline void zero(array self):             # <<<<<<<<<<<<<<
 *     """ set all elements of array to zero. """
 *     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
 */

static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("zero", 0);

  /* "array.pxd":163
 * cdef inline void zero(array self):
 *     """ set all elements of array to zero. """
 *     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)             # <<<<<<<<<<<<<<
 */
  (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize)));

  /* "array.pxd":161
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 * 
 * cdef inline void zero(array self):             # <<<<<<<<<<<<<<
 *     """ set all elements of array to zero. """
 *     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchemaField __pyx_vtable_5capnp_3lib_5capnp__StructSchemaField;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__StructSchemaField(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *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_5capnp_3lib_5capnp__StructSchemaField *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__StructSchemaField;
  new((void*)&(p->thisptr))  ::capnp::StructSchema::Field();
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__StructSchemaField(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *p = (struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__StructSchemaField(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *p = (struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__StructSchemaField(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *p = (struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_18_StructSchemaField_proto(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_5proto_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_18_StructSchemaField_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_6schema_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__StructSchemaField[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_18_StructSchemaField_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_18_StructSchemaField_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_18_StructSchemaField_4__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__StructSchemaField[] = {
  {(char *)"proto", __pyx_getprop_5capnp_3lib_5capnp_18_StructSchemaField_proto, 0, (char *)"The raw schema proto", 0},
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_18_StructSchemaField_schema, 0, (char *)"The schema of this field, or None if it's a type without a schema", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__StructSchemaField = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._StructSchemaField", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__StructSchemaField, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_18_StructSchemaField_1__repr__, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__StructSchemaField, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__StructSchemaField, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__StructSchemaField, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__StructSchemaField, /*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_5capnp_3lib_5capnp__StructSchemaField, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__StringArrayPtr __pyx_vtable_5capnp_3lib_5capnp__StringArrayPtr;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__StringArrayPtr(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *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_5capnp_3lib_5capnp__StringArrayPtr *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__StringArrayPtr;
  p->parent = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__StringArrayPtr(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *p = (struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__StringArrayPtr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *p = (struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)o;
  if (p->parent) {
    e = (*v)(p->parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__StringArrayPtr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *p = (struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)o;
  tmp = ((PyObject*)p->parent);
  p->parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__StringArrayPtr[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_15_StringArrayPtr_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_StringArrayPtr_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_15_StringArrayPtr_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__StringArrayPtr = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._StringArrayPtr", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__StringArrayPtr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__StringArrayPtr, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__StringArrayPtr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__StringArrayPtr, /*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_5capnp_3lib_5capnp__StringArrayPtr, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp_SchemaParser __pyx_vtable_5capnp_3lib_5capnp_SchemaParser;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_SchemaParser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *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_5capnp_3lib_5capnp_SchemaParser *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp_SchemaParser;
  p->modules_by_id = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_all_imports = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_last_import_array = ((struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp_SchemaParser(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *p = (struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->modules_by_id);
  Py_CLEAR(p->_all_imports);
  Py_CLEAR(p->_last_import_array);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp_SchemaParser(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *p = (struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)o;
  if (p->modules_by_id) {
    e = (*v)(p->modules_by_id, a); if (e) return e;
  }
  if (p->_all_imports) {
    e = (*v)(p->_all_imports, a); if (e) return e;
  }
  if (p->_last_import_array) {
    e = (*v)(((PyObject *)p->_last_import_array), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp_SchemaParser(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *p = (struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)o;
  tmp = ((PyObject*)p->modules_by_id);
  p->modules_by_id = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_all_imports);
  p->_all_imports = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_last_import_array);
  p->_last_import_array = ((struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_12SchemaParser_modules_by_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_12SchemaParser_modules_by_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_12SchemaParser_13modules_by_id_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp_SchemaParser[] = {
  {"_parse_disk_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_5_parse_disk_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_12SchemaParser_4_parse_disk_file},
  {"load", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_7load, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_12SchemaParser_6load},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_9__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12SchemaParser_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12SchemaParser_11__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_12SchemaParser_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp_SchemaParser[] = {
  {(char *)"modules_by_id", __pyx_getprop_5capnp_3lib_5capnp_12SchemaParser_modules_by_id, __pyx_setprop_5capnp_3lib_5capnp_12SchemaParser_modules_by_id, (char *)"modules_by_id: dict", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp_SchemaParser = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.SchemaParser", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp_SchemaParser, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "A class for loading Cap'n Proto schema files.\n\n    Do not use this class unless you're sure you know what you're doing. Use the convenience method :func:`load` instead.\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp_SchemaParser, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp_SchemaParser, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp_SchemaParser, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp_SchemaParser, /*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_5capnp_3lib_5capnp_SchemaParser, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicOrphan __pyx_vtable_5capnp_3lib_5capnp__DynamicOrphan;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicOrphan(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *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_5capnp_3lib_5capnp__DynamicOrphan *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicOrphan;
  new((void*)&(p->thisptr))  ::capnp::Orphan< ::capnp::DynamicValue>();
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicOrphan(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicOrphan(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicOrphan(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14_DynamicOrphan__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14_DynamicOrphan__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicOrphan[] = {
  {"get", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_1get, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_DynamicOrphan_get},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_7__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_DynamicOrphan_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_9__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_14_DynamicOrphan_8__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicOrphan[] = {
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_14_DynamicOrphan__parent, __pyx_setprop_5capnp_3lib_5capnp_14_DynamicOrphan__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicOrphan = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicOrphan", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicOrphan, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_14_DynamicOrphan_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_5capnp_3lib_5capnp_14_DynamicOrphan_3__str__, /*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_5capnp_3lib_5capnp__DynamicOrphan, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicOrphan, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicOrphan, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicOrphan, /*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_5capnp_3lib_5capnp__DynamicOrphan, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader __pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicStructReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *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_5capnp_3lib_5capnp__DynamicStructReader *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructReader;
  new((void*)&(p->thisptr))  ::capnp::DynamicStruct::Reader();
  p->_parent = Py_None; Py_INCREF(Py_None);
  p->_obj_to_pin = Py_None; Py_INCREF(Py_None);
  p->_schema = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicStructReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->_parent);
  Py_CLEAR(p->_obj_to_pin);
  Py_CLEAR(p->_schema);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicStructReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  if (p->_obj_to_pin) {
    e = (*v)(p->_obj_to_pin, a); if (e) return e;
  }
  if (p->_schema) {
    e = (*v)(p->_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicStructReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_obj_to_pin);
  p->_obj_to_pin = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_schema);
  p->_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_getattro_5capnp_3lib_5capnp__DynamicStructReader(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_3__getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader_which(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_5which_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_6schema_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader_total_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_10total_size_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_20_DynamicStructReader__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_parent_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader_is_root(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_20_DynamicStructReader_is_root(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7is_root_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicStructReader[] = {
  {"_get", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_1_get, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader__get},
  {"__getattr__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_3__getattr__, METH_O|METH_COEXIST, 0},
  {"_get_by_field", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_5_get_by_field, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_4_get_by_field},
  {"_has", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_7_has, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_6_has},
  {"_has_by_field", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_9_has_by_field, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_8_has_by_field},
  {"_which_str", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_11_which_str, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_10_which_str},
  {"_which", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_13_which, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_12_which},
  {"__dir__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_15__dir__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_14__dir__},
  {"to_dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_21to_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_20to_dict},
  {"as_builder", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_23as_builder, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_22as_builder},
  {"__reduce_ex__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_25__reduce_ex__, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_DynamicStructReader_24__reduce_ex__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicStructReader[] = {
  {(char *)"which", __pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader_which, 0, (char *)"Returns the enum corresponding to the union in this struct\n\n        :rtype: :class:`_DynamicEnumField`\n        :return: A string/enum corresponding to what field is set in the union\n\n        :Raises: :exc:`KjException` if this struct doesn't contain a union\n        ", 0},
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader_schema, 0, (char *)"A property that returns the _StructSchema object matching this reader", 0},
  {(char *)"total_size", __pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader_total_size, 0, (char *)0, 0},
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader__parent, __pyx_setprop_5capnp_3lib_5capnp_20_DynamicStructReader__parent, (char *)"_parent: object", 0},
  {(char *)"is_root", __pyx_getprop_5capnp_3lib_5capnp_20_DynamicStructReader_is_root, __pyx_setprop_5capnp_3lib_5capnp_20_DynamicStructReader_is_root, (char *)"is_root: 'bool'", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicStructReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicStructReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicStructReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_20_DynamicStructReader_19__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_17__str__, /*tp_str*/
  __pyx_tp_getattro_5capnp_3lib_5capnp__DynamicStructReader, /*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*/
  "Reads Cap'n Proto structs\n\n    This class is almost a 1 for 1 wrapping of the Cap'n Proto C++ DynamicStruct::Reader. The only difference is that instead of a `get` method, __getattr__ is overloaded and the field name is passed onto the C++ equivalent `get`. This means you just use . syntax to access any field. For field names that don't follow valid python naming convention for fields, use the global function :py:func:`getattr`::\n\n        person = addressbook.Person.read(file) # This returns a _DynamicStructReader\n        print person.name # using . syntax\n        print getattr(person, 'field-with-hyphens') # for names that are invalid for python, use getattr\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicStructReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicStructReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicStructReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicStructReader, /*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_5capnp_3lib_5capnp__DynamicStructReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicStructBuilder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *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_5capnp_3lib_5capnp__DynamicStructBuilder *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructBuilder;
  new((void*)&(p->thisptr))  ::capnp::DynamicStruct::Builder();
  p->_parent = Py_None; Py_INCREF(Py_None);
  p->_schema = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicStructBuilder(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->_parent);
  Py_CLEAR(p->_schema);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicStructBuilder(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  if (p->_schema) {
    e = (*v)(p->_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicStructBuilder(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_schema);
  p->_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_getattro_5capnp_3lib_5capnp__DynamicStructBuilder(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_17__getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_5capnp_3lib_5capnp__DynamicStructBuilder(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_23__setattr__(o, n, v);
  }
  else {
    return PyObject_GenericSetAttr(o, n, 0);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_which(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_5which_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_6schema_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_total_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_10total_size_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_21_DynamicStructBuilder__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7_parent_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_is_root(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_is_root(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7is_root_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder__is_written(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_21_DynamicStructBuilder__is_written(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11_is_written_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicStructBuilder[] = {
  {"write", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_1write, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_write},
  {"write_packed", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_3write_packed, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_2write_packed},
  {"to_bytes", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_5to_bytes, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_4to_bytes},
  {"to_segments", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_7to_segments, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_6to_segments},
  {"_to_bytes_packed_helper", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_9_to_bytes_packed_helper, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_8_to_bytes_packed_helper},
  {"to_bytes_packed", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_11to_bytes_packed, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_10to_bytes_packed},
  {"_get", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_13_get, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_12_get},
  {"_get_by_field", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_15_get_by_field, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_14_get_by_field},
  {"__getattr__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_17__getattr__, METH_O|METH_COEXIST, 0},
  {"_set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_19_set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_18_set},
  {"_set_by_field", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_21_set_by_field, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_20_set_by_field},
  {"_has", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_25_has, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_24_has},
  {"_has_by_field", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_27_has_by_field, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_26_has_by_field},
  {"init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_29init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_28init},
  {"_init_by_field", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_31_init_by_field, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_30_init_by_field},
  {"init_resizable_list", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_33init_resizable_list, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_32init_resizable_list},
  {"_which_str", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_35_which_str, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_34_which_str},
  {"_which", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_37_which, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_36_which},
  {"adopt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_39adopt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_38adopt},
  {"disown", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_41disown, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_40disown},
  {"as_reader", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_43as_reader, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_42as_reader},
  {"copy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_45copy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_44copy},
  {"__dir__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_47__dir__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_46__dir__},
  {"to_dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_53to_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_52to_dict},
  {"from_dict", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_55from_dict, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_54from_dict},
  {"clear_write_flag", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_57clear_write_flag, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_56clear_write_flag},
  {"__reduce_ex__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_59__reduce_ex__, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicStructBuilder_58__reduce_ex__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicStructBuilder[] = {
  {(char *)"which", __pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_which, 0, (char *)"Returns the enum corresponding to the union in this struct\n\n        :rtype: :class:`_DynamicEnumField`\n        :return: A string/enum corresponding to what field is set in the union\n\n        :Raises: :exc:`KjException` if this struct doesn't contain a union\n        ", 0},
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_schema, 0, (char *)"A property that returns the _StructSchema object matching this writer", 0},
  {(char *)"total_size", __pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_total_size, 0, (char *)0, 0},
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder__parent, __pyx_setprop_5capnp_3lib_5capnp_21_DynamicStructBuilder__parent, (char *)"_parent: object", 0},
  {(char *)"is_root", __pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_is_root, __pyx_setprop_5capnp_3lib_5capnp_21_DynamicStructBuilder_is_root, (char *)"is_root: 'bool'", 0},
  {(char *)"_is_written", __pyx_getprop_5capnp_3lib_5capnp_21_DynamicStructBuilder__is_written, __pyx_setprop_5capnp_3lib_5capnp_21_DynamicStructBuilder__is_written, (char *)"_is_written: 'bool'", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicStructBuilder = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicStructBuilder", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicStructBuilder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_21_DynamicStructBuilder_51__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_49__str__, /*tp_str*/
  __pyx_tp_getattro_5capnp_3lib_5capnp__DynamicStructBuilder, /*tp_getattro*/
  __pyx_tp_setattro_5capnp_3lib_5capnp__DynamicStructBuilder, /*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*/
  "Builds Cap'n Proto structs\n\n    This class is almost a 1 for 1 wrapping of the Cap'n Proto C++ DynamicStruct::Builder. The only difference is that instead of a `get`/`set` method, __getattr__/__setattr__ is overloaded and the field name is passed onto the C++ equivalent function. This means you just use . syntax to access or set any field. For field names that don't follow valid python naming convention for fields, use the global functions :py:func:`getattr`/:py:func:`setattr`::\n\n        person = addressbook.Person.new_message() # This returns a _DynamicStructBuilder\n\n        person.name = 'foo' # using . syntax\n        print person.name # using . syntax\n\n        setattr(person, 'field-with-hyphens', 'foo') # for names that are invalid for python, use setattr\n        print getattr(person, 'field-with-hyphens') # for names that are invalid for python, use getattr\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicStructBuilder, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicStructBuilder, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicStructBuilder, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicStructBuilder, /*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_5capnp_3lib_5capnp__DynamicStructBuilder, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnumField __pyx_vtable_5capnp_3lib_5capnp__DynamicEnumField;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicEnumField(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *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_5capnp_3lib_5capnp__DynamicEnumField *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicEnumField;
  p->thisptr = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicEnumField(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicEnumField(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)o;
  if (p->thisptr) {
    e = (*v)(p->thisptr, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicEnumField(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *)o;
  tmp = ((PyObject*)p->thisptr);
  p->thisptr = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_17_DynamicEnumField_raw(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_3raw_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicEnumField[] = {
  {"_str", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_1_str, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_17_DynamicEnumField__str},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_11__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_17_DynamicEnumField_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_13__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_17_DynamicEnumField_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicEnumField[] = {
  {(char *)"raw", __pyx_getprop_5capnp_3lib_5capnp_17_DynamicEnumField_raw, 0, (char *)"A property that returns the raw int of the enum", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicEnumField = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicEnumField", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicEnumField, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_17_DynamicEnumField_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_9__call__, /*tp_call*/
  __pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_3__str__, /*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_5capnp_3lib_5capnp__DynamicEnumField, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicEnumField, /*tp_clear*/
  __pyx_pw_5capnp_3lib_5capnp_17_DynamicEnumField_7__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicEnumField, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicEnumField, /*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_5capnp_3lib_5capnp__DynamicEnumField, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Schema __pyx_vtable_5capnp_3lib_5capnp__Schema;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Schema(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__Schema *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_5capnp_3lib_5capnp__Schema *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__Schema;
  new((void*)&(p->thisptr))  ::capnp::Schema();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__Schema(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__Schema *p = (struct __pyx_obj_5capnp_3lib_5capnp__Schema *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_7_Schema_node(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_7_Schema_4node_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__Schema[] = {
  {"as_const_value", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_7_Schema_1as_const_value, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_7_Schema_as_const_value},
  {"as_struct", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_7_Schema_3as_struct, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_7_Schema_2as_struct},
  {"as_interface", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_7_Schema_5as_interface, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_7_Schema_4as_interface},
  {"as_enum", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_7_Schema_7as_enum, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_7_Schema_6as_enum},
  {"get_proto", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_7_Schema_9get_proto, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_7_Schema_8get_proto},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_7_Schema_11__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_7_Schema_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_7_Schema_13__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_7_Schema_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__Schema[] = {
  {(char *)"node", __pyx_getprop_5capnp_3lib_5capnp_7_Schema_node, 0, (char *)"The raw schema node", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__Schema = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._Schema", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__Schema), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__Schema, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__Schema, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__Schema, /*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_5capnp_3lib_5capnp__Schema, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceSchema __pyx_vtable_5capnp_3lib_5capnp__InterfaceSchema;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__InterfaceSchema(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *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_5capnp_3lib_5capnp__InterfaceSchema *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__InterfaceSchema;
  new((void*)&(p->thisptr))  ::capnp::InterfaceSchema();
  p->__pyx___method_names = Py_None; Py_INCREF(Py_None);
  p->__pyx___method_names_inherited = Py_None; Py_INCREF(Py_None);
  p->__pyx___methods = Py_None; Py_INCREF(Py_None);
  p->__pyx___methods_inherited = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__InterfaceSchema(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *p = (struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->__pyx___method_names);
  Py_CLEAR(p->__pyx___method_names_inherited);
  Py_CLEAR(p->__pyx___methods);
  Py_CLEAR(p->__pyx___methods_inherited);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__InterfaceSchema(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *p = (struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)o;
  if (p->__pyx___method_names) {
    e = (*v)(p->__pyx___method_names, a); if (e) return e;
  }
  if (p->__pyx___method_names_inherited) {
    e = (*v)(p->__pyx___method_names_inherited, a); if (e) return e;
  }
  if (p->__pyx___methods) {
    e = (*v)(p->__pyx___methods, a); if (e) return e;
  }
  if (p->__pyx___methods_inherited) {
    e = (*v)(p->__pyx___methods_inherited, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__InterfaceSchema(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *p = (struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)o;
  tmp = ((PyObject*)p->__pyx___method_names);
  p->__pyx___method_names = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx___method_names_inherited);
  p->__pyx___method_names_inherited = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx___methods);
  p->__pyx___methods = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx___methods_inherited);
  p->__pyx___methods_inherited = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_method_names(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_12method_names_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_method_names_inherited(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_22method_names_inherited_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_methods(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_7methods_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_methods_inherited(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_17methods_inherited_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_superclasses(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_12superclasses_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_node(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_4node_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__InterfaceSchema[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_16_InterfaceSchema_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_16_InterfaceSchema_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_16_InterfaceSchema_4__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__InterfaceSchema[] = {
  {(char *)"method_names", __pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_method_names, 0, (char *)"A tuple of the function names in the interface.", 0},
  {(char *)"method_names_inherited", __pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_method_names_inherited, 0, (char *)"A set of the function names in the interface, including inherited methods", 0},
  {(char *)"methods", __pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_methods, 0, (char *)"A mapping of method names to their respective _InterfaceMethod", 0},
  {(char *)"methods_inherited", __pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_methods_inherited, 0, (char *)"A mapping of method names to their respective _InterfaceMethod, including inherited methods", 0},
  {(char *)"superclasses", __pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_superclasses, 0, (char *)"A list of superclasses for this interface", 0},
  {(char *)"node", __pyx_getprop_5capnp_3lib_5capnp_16_InterfaceSchema_node, 0, (char *)"The raw schema node", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__InterfaceSchema = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._InterfaceSchema", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__InterfaceSchema, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_16_InterfaceSchema_1__repr__, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__InterfaceSchema, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__InterfaceSchema, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__InterfaceSchema, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__InterfaceSchema, /*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_5capnp_3lib_5capnp__InterfaceSchema, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicEnum __pyx_vtable_5capnp_3lib_5capnp__DynamicEnum;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicEnum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *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_5capnp_3lib_5capnp__DynamicEnum *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicEnum;
  new((void*)&(p->thisptr))  ::capnp::DynamicEnum();
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicEnum(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicEnum(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicEnum(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_12_DynamicEnum_raw(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_3raw_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_12_DynamicEnum__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_12_DynamicEnum__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicEnum[] = {
  {"_as_str", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_1_as_str, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12_DynamicEnum__as_str},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_11__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12_DynamicEnum_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_13__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_12_DynamicEnum_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicEnum[] = {
  {(char *)"raw", __pyx_getprop_5capnp_3lib_5capnp_12_DynamicEnum_raw, 0, (char *)"A property that returns the raw int of the enum", 0},
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_12_DynamicEnum__parent, __pyx_setprop_5capnp_3lib_5capnp_12_DynamicEnum__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicEnum = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicEnum", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicEnum, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_12_DynamicEnum_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_3__str__, /*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_5capnp_3lib_5capnp__DynamicEnum, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicEnum, /*tp_clear*/
  __pyx_pw_5capnp_3lib_5capnp_12_DynamicEnum_7__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicEnum, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicEnum, /*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_5capnp_3lib_5capnp__DynamicEnum, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListBuilder __pyx_vtable_5capnp_3lib_5capnp__DynamicListBuilder;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicListBuilder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *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_5capnp_3lib_5capnp__DynamicListBuilder *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicListBuilder;
  new((void*)&(p->thisptr))  ::capnp::DynamicList::Builder();
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicListBuilder(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicListBuilder(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicListBuilder(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_5capnp_3lib_5capnp__DynamicListBuilder(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_5capnp_3lib_5capnp__DynamicListBuilder(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7__setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_19_DynamicListBuilder__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_19_DynamicListBuilder__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicListBuilder[] = {
  {"_get", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_1_get, METH_O, __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder__get},
  {"_set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_5_set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_4_set},
  {"adopt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_11adopt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_10adopt},
  {"disown", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_13disown, METH_O, __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_12disown},
  {"init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_15init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_14init},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_21__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_20__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_23__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_19_DynamicListBuilder_22__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicListBuilder[] = {
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_19_DynamicListBuilder__parent, __pyx_setprop_5capnp_3lib_5capnp_19_DynamicListBuilder__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence__DynamicListBuilder = {
  __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_9__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_5capnp_3lib_5capnp__DynamicListBuilder, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__DynamicListBuilder = {
  __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_9__len__, /*mp_length*/
  __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_3__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_5capnp_3lib_5capnp__DynamicListBuilder, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicListBuilder = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicListBuilder", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicListBuilder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_19_DynamicListBuilder_19__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence__DynamicListBuilder, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__DynamicListBuilder, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_5capnp_3lib_5capnp_19_DynamicListBuilder_17__str__, /*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*/
  "Class for building Cap'n Proto Lists\n\n    This class thinly wraps the C++ Cap'n Proto DynamicList::Bulder class. __getitem__, __setitem__, and __len__ have been defined properly, so you can treat this class mostly like any other iterable class::\n\n        ...\n        person = addressbook.Person.new_message()\n\n        phones = person.init('phones', 2) # This returns a _DynamicListBuilder\n\n        phone = phones[0]\n        phone.number = 'foo'\n        phone = phones[1]\n        phone.number = 'bar'\n\n        for phone in phones:\n            print phone.number\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicListBuilder, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicListBuilder, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicListBuilder, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicListBuilder, /*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_5capnp_3lib_5capnp__DynamicListBuilder, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder __pyx_vtable_5capnp_3lib_5capnp__MessageBuilder;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MessageBuilder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *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_5capnp_3lib_5capnp__MessageBuilder *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__MessageBuilder;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageBuilder(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__MessageBuilder[] = {
  {"init_root", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_5init_root, METH_O, __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_4init_root},
  {"get_root", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_7get_root, METH_O, __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_6get_root},
  {"get_root_as_any", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_9get_root_as_any, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_8get_root_as_any},
  {"set_root", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_11set_root, METH_O, __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_10set_root},
  {"get_segments_for_output", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_13get_segments_for_output, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_12get_segments_for_output},
  {"new_orphan", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_15new_orphan, METH_O, __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_14new_orphan},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_17__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_16__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15_MessageBuilder_19__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_15_MessageBuilder_18__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__MessageBuilder = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._MessageBuilder", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageBuilder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  "_MessageBuilder()\nAn abstract base class for building Cap'n Proto messages\n\n    .. warning:: Don't ever instantiate this class directly. It is only used for inheritance.\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__MessageBuilder, /*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_5capnp_3lib_5capnp_15_MessageBuilder_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__MessageBuilder, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__KjExceptionWrapper __pyx_vtable_5capnp_3lib_5capnp__KjExceptionWrapper;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__KjExceptionWrapper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *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_5capnp_3lib_5capnp__KjExceptionWrapper *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__KjExceptionWrapper;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__KjExceptionWrapper(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_19_KjExceptionWrapper_file(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_4file_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_19_KjExceptionWrapper_line(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_4line_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_19_KjExceptionWrapper_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_4type_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_19_KjExceptionWrapper_description(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_11description_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__KjExceptionWrapper[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_19_KjExceptionWrapper_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_19_KjExceptionWrapper_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__KjExceptionWrapper[] = {
  {(char *)"file", __pyx_getprop_5capnp_3lib_5capnp_19_KjExceptionWrapper_file, 0, (char *)0, 0},
  {(char *)"line", __pyx_getprop_5capnp_3lib_5capnp_19_KjExceptionWrapper_line, 0, (char *)0, 0},
  {(char *)"type", __pyx_getprop_5capnp_3lib_5capnp_19_KjExceptionWrapper_type, 0, (char *)0, 0},
  {(char *)"description", __pyx_getprop_5capnp_3lib_5capnp_19_KjExceptionWrapper_description, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._KjExceptionWrapper", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__KjExceptionWrapper, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  __pyx_pw_5capnp_3lib_5capnp_19_KjExceptionWrapper_3__str__, /*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_5capnp_3lib_5capnp__KjExceptionWrapper, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__KjExceptionWrapper, /*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_5capnp_3lib_5capnp__KjExceptionWrapper, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__NodeReader __pyx_vtable_5capnp_3lib_5capnp__NodeReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__NodeReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *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_5capnp_3lib_5capnp__NodeReader *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__NodeReader;
  new((void*)&(p->thisptr))  ::capnp::schema::Node::Reader();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__NodeReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_displayName(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_NodeReader_11displayName_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_scopeId(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_NodeReader_7scopeId_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_NodeReader_2id_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_nestedNodes(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_NodeReader_11nestedNodes_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_isStruct(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_NodeReader_8isStruct_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_isConst(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_NodeReader_7isConst_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_isInterface(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_NodeReader_11isInterface_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_isEnum(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_NodeReader_6isEnum_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__NodeReader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_1__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_11_NodeReader___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_NodeReader_3__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_11_NodeReader_2__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__NodeReader[] = {
  {(char *)"displayName", __pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_displayName, 0, (char *)0, 0},
  {(char *)"scopeId", __pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_scopeId, 0, (char *)0, 0},
  {(char *)"id", __pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_id, 0, (char *)0, 0},
  {(char *)"nestedNodes", __pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_nestedNodes, 0, (char *)0, 0},
  {(char *)"isStruct", __pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_isStruct, 0, (char *)0, 0},
  {(char *)"isConst", __pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_isConst, 0, (char *)0, 0},
  {(char *)"isInterface", __pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_isInterface, 0, (char *)0, 0},
  {(char *)"isEnum", __pyx_getprop_5capnp_3lib_5capnp_11_NodeReader_isEnum, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__NodeReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._NodeReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__NodeReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__NodeReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__NodeReader, /*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_5capnp_3lib_5capnp__NodeReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__NestedNodeReader __pyx_vtable_5capnp_3lib_5capnp__NestedNodeReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__NestedNodeReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *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_5capnp_3lib_5capnp__NestedNodeReader *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__NestedNodeReader;
  new((void*)&(p->thisptr))  ::capnp::schema::Node::NestedNode::Reader();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__NestedNodeReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_17_NestedNodeReader_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_4name_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_17_NestedNodeReader_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_2id_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__NestedNodeReader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_1__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_17_NestedNodeReader___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_17_NestedNodeReader_3__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_17_NestedNodeReader_2__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__NestedNodeReader[] = {
  {(char *)"name", __pyx_getprop_5capnp_3lib_5capnp_17_NestedNodeReader_name, 0, (char *)0, 0},
  {(char *)"id", __pyx_getprop_5capnp_3lib_5capnp_17_NestedNodeReader_id, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__NestedNodeReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._NestedNodeReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__NestedNodeReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__NestedNodeReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__NestedNodeReader, /*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_5capnp_3lib_5capnp__NestedNodeReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicListReader __pyx_vtable_5capnp_3lib_5capnp__DynamicListReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicListReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *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_5capnp_3lib_5capnp__DynamicListReader *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicListReader;
  new((void*)&(p->thisptr))  ::capnp::DynamicList::Reader();
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicListReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicListReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicListReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_5capnp_3lib_5capnp__DynamicListReader(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 PyObject *__pyx_getprop_5capnp_3lib_5capnp_18_DynamicListReader__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_18_DynamicListReader__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicListReader[] = {
  {"_get", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_1_get, METH_O, __pyx_doc_5capnp_3lib_5capnp_18_DynamicListReader__get},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_11__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_18_DynamicListReader_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_13__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_18_DynamicListReader_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicListReader[] = {
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_18_DynamicListReader__parent, __pyx_setprop_5capnp_3lib_5capnp_18_DynamicListReader__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence__DynamicListReader = {
  __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_5__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_5capnp_3lib_5capnp__DynamicListReader, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__DynamicListReader = {
  __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_5__len__, /*mp_length*/
  __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_3__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicListReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicListReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicListReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_18_DynamicListReader_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence__DynamicListReader, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__DynamicListReader, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_5capnp_3lib_5capnp_18_DynamicListReader_7__str__, /*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*/
  "Class for reading Cap'n Proto Lists\n\n    This class thinly wraps the C++ Cap'n Proto DynamicList::Reader class. __getitem__ and __len__ have been defined properly, so you can treat this class mostly like any other iterable class::\n\n        ...\n        person = addressbook.Person.read(file)\n\n        phones = person.phones # This returns a _DynamicListReader\n\n        phone = phones[0]\n        print phone.number\n\n        for phone in phones:\n            print phone.number\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicListReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicListReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicListReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicListReader, /*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_5capnp_3lib_5capnp__DynamicListReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicResizableListBuilder __pyx_vtable_5capnp_3lib_5capnp__DynamicResizableListBuilder;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicResizableListBuilder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *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_5capnp_3lib_5capnp__DynamicResizableListBuilder *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicResizableListBuilder;
  p->_parent = Py_None; Py_INCREF(Py_None);
  p->_message = Py_None; Py_INCREF(Py_None);
  p->_field = Py_None; Py_INCREF(Py_None);
  p->_schema = Py_None; Py_INCREF(Py_None);
  p->_list = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicResizableListBuilder(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_parent);
  Py_CLEAR(p->_message);
  Py_CLEAR(p->_field);
  Py_CLEAR(p->_schema);
  Py_CLEAR(p->_list);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicResizableListBuilder(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  if (p->_message) {
    e = (*v)(p->_message, a); if (e) return e;
  }
  if (p->_field) {
    e = (*v)(p->_field, a); if (e) return e;
  }
  if (p->_schema) {
    e = (*v)(p->_schema, a); if (e) return e;
  }
  if (p->_list) {
    e = (*v)(p->_list, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicResizableListBuilder(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_message);
  p->_message = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_field);
  p->_field = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_schema);
  p->_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_list);
  p->_list = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_5capnp_3lib_5capnp__DynamicResizableListBuilder(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 PyObject *__pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_parent_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__message(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__message(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_8_message_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__field(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__field(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_6_field_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__schema(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7_schema_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__list(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__list(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_list_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicResizableListBuilder[] = {
  {"add", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_3add, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_2add},
  {"_get", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_5_get, METH_O, __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_4_get},
  {"finish", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_11finish, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_10finish},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_13__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_15__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_14__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicResizableListBuilder[] = {
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__parent, __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__parent, (char *)"_parent: object", 0},
  {(char *)"_message", __pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__message, __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__message, (char *)"_message: object", 0},
  {(char *)"_field", __pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__field, __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__field, (char *)"_field: object", 0},
  {(char *)"_schema", __pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__schema, __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__schema, (char *)"_schema: object", 0},
  {(char *)"_list", __pyx_getprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__list, __pyx_setprop_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__list, (char *)"_list: list", 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence__DynamicResizableListBuilder = {
  __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_9__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_5capnp_3lib_5capnp__DynamicResizableListBuilder, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__DynamicResizableListBuilder = {
  __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_9__len__, /*mp_length*/
  __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_7__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicResizableListBuilder", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicResizableListBuilder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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__DynamicResizableListBuilder, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__DynamicResizableListBuilder, /*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*/
  "_DynamicResizableListBuilder(parent, field, schema)\nClass for building growable Cap'n Proto Lists\n\n    .. warning:: You need to call :meth:`finish` on this object before serializing the Cap'n Proto message. Failure to do so will cause your objects not to be written out as well as leaking orphan structs into your message.\n\n    This class works much like :class:`_DynamicListBuilder`, but it allows growing the list dynamically. It is meant for lists of structs, since for primitive types like int or float, you're much better off using a normal python list and then serializing straight to a Cap'n Proto list. It has __getitem__ and __len__ defined, but not __setitem__::\n\n        ...\n        person = addressbook.Person.new_message()\n\n        phones = person.init_resizable_list('phones') # This returns a _DynamicResizableListBuilder\n\n        phone = phones.add()\n        phone.number = 'foo'\n        phone = phones.add()\n        phone.number = 'bar'\n\n        people.finish()\n\n        f = open('example', 'w')\n        person.write(f)\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicResizableListBuilder, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicResizableListBuilder, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicResizableListBuilder, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicResizableListBuilder, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__DynamicResizableListBuilder, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__List_NestedNode_Reader __pyx_vtable_5capnp_3lib_5capnp__List_NestedNode_Reader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__List_NestedNode_Reader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *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_5capnp_3lib_5capnp__List_NestedNode_Reader *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__List_NestedNode_Reader;
  new((void*)&(p->thisptr)) capnp::List<capnp::schema::Node::NestedNode>::Reader();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__List_NestedNode_Reader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *p = (struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_5capnp_3lib_5capnp__List_NestedNode_Reader(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 PyMethodDef __pyx_methods_5capnp_3lib_5capnp__List_NestedNode_Reader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_23_List_NestedNode_Reader_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_23_List_NestedNode_Reader_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence__List_NestedNode_Reader = {
  __pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_3__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_5capnp_3lib_5capnp__List_NestedNode_Reader, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping__List_NestedNode_Reader = {
  __pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_3__len__, /*mp_length*/
  __pyx_pw_5capnp_3lib_5capnp_23_List_NestedNode_Reader_1__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._List_NestedNode_Reader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__List_NestedNode_Reader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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__List_NestedNode_Reader, /*tp_as_sequence*/
  &__pyx_tp_as_mapping__List_NestedNode_Reader, /*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_5capnp_3lib_5capnp__List_NestedNode_Reader, /*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_5capnp_3lib_5capnp__List_NestedNode_Reader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MessageSize(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  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;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageSize(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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_5capnp_3lib_5capnp_12_MessageSize_word_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_10word_count_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_12_MessageSize_word_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_10word_count_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_12_MessageSize_cap_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_9cap_count_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_12_MessageSize_cap_count(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_9cap_count_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__MessageSize[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12_MessageSize_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_MessageSize_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_12_MessageSize_4__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__MessageSize[] = {
  {(char *)"word_count", __pyx_getprop_5capnp_3lib_5capnp_12_MessageSize_word_count, __pyx_setprop_5capnp_3lib_5capnp_12_MessageSize_word_count, (char *)"word_count: 'uint64_t'", 0},
  {(char *)"cap_count", __pyx_getprop_5capnp_3lib_5capnp_12_MessageSize_cap_count, __pyx_setprop_5capnp_3lib_5capnp_12_MessageSize_cap_count, (char *)"cap_count: 'uint'", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__MessageSize = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._MessageSize", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__MessageSize), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageSize, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  "_MessageSize(uint64_t word_count, uint cap_count)", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__MessageSize, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__MessageSize, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_12_MessageSize_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__MessageSize, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructPipeline __pyx_vtable_5capnp_3lib_5capnp__DynamicStructPipeline;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicStructPipeline(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *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_5capnp_3lib_5capnp__DynamicStructPipeline *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructPipeline;
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicStructPipeline(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicStructPipeline(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicStructPipeline(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_getattro_5capnp_3lib_5capnp__DynamicStructPipeline(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_5__getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_22_DynamicStructPipeline_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_6schema_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_22_DynamicStructPipeline__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_22_DynamicStructPipeline__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicStructPipeline[] = {
  {"_get", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_3_get, METH_O, __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_2_get},
  {"__getattr__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_5__getattr__, METH_O|METH_COEXIST, 0},
  {"__dir__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_7__dir__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_6__dir__},
  {"to_dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_9to_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_8to_dict},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_11__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_DynamicStructPipeline_13__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_22_DynamicStructPipeline_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicStructPipeline[] = {
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_22_DynamicStructPipeline_schema, 0, (char *)"A property that returns the _StructSchema object matching this reader", 0},
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_22_DynamicStructPipeline__parent, __pyx_setprop_5capnp_3lib_5capnp_22_DynamicStructPipeline__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicStructPipeline = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicStructPipeline", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicStructPipeline, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  __pyx_tp_getattro_5capnp_3lib_5capnp__DynamicStructPipeline, /*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*/
  "Reads Cap'n Proto structs\n\n    This class is almost a 1 for 1 wrapping of the Cap'n Proto C++ DynamicStruct::Pipeline. The only difference is that instead of a `get` method, __getattr__ is overloaded and the field name is passed onto the C++ equivalent `get`. This means you just use . syntax to access any field. For field names that don't follow valid python naming convention for fields, use the global function :py:func:`getattr`::\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicStructPipeline, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicStructPipeline, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicStructPipeline, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicStructPipeline, /*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_5capnp_3lib_5capnp__DynamicStructPipeline, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectReader __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicObjectReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *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_5capnp_3lib_5capnp__DynamicObjectReader *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicObjectReader;
  new((void*)&(p->thisptr))  ::capnp::AnyPointer::Reader();
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicObjectReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicObjectReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicObjectReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_20_DynamicObjectReader__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_20_DynamicObjectReader__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicObjectReader[] = {
  {"as_struct", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_1as_struct, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_as_struct},
  {"as_interface", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_3as_interface, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_2as_interface},
  {"as_list", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_5as_list, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_4as_list},
  {"as_text", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_7as_text, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_6as_text},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_9__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_DynamicObjectReader_11__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_DynamicObjectReader_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicObjectReader[] = {
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_20_DynamicObjectReader__parent, __pyx_setprop_5capnp_3lib_5capnp_20_DynamicObjectReader__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicObjectReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicObjectReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicObjectReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicObjectReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicObjectReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicObjectReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicObjectReader, /*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_5capnp_3lib_5capnp__DynamicObjectReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicObjectBuilder __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicObjectBuilder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *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_5capnp_3lib_5capnp__DynamicObjectBuilder *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicObjectBuilder;
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicObjectBuilder(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicObjectBuilder(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicObjectBuilder(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_21_DynamicObjectBuilder__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_21_DynamicObjectBuilder__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicObjectBuilder[] = {
  {"as_struct", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_3as_struct, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_2as_struct},
  {"as_interface", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_5as_interface, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_4as_interface},
  {"as_list", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_7as_list, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_6as_list},
  {"set", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_9set, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_8set},
  {"set_as_text", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_11set_as_text, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_10set_as_text},
  {"init_as_list", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_13init_as_list, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_12init_as_list},
  {"as_text", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_15as_text, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_14as_text},
  {"as_reader", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_17as_reader, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_16as_reader},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_19__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_18__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_DynamicObjectBuilder_21__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_DynamicObjectBuilder_20__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicObjectBuilder[] = {
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_21_DynamicObjectBuilder__parent, __pyx_setprop_5capnp_3lib_5capnp_21_DynamicObjectBuilder__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicObjectBuilder", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicObjectBuilder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicObjectBuilder, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicObjectBuilder, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicObjectBuilder, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicObjectBuilder, /*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_5capnp_3lib_5capnp__DynamicObjectBuilder, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__EventLoop __pyx_vtable_5capnp_3lib_5capnp__EventLoop;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__EventLoop(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *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_5capnp_3lib_5capnp__EventLoop *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__EventLoop;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__EventLoop(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_10_EventLoop_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__EventLoop[] = {
  {"_remove", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_5_remove, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_10_EventLoop_4_remove},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_7__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_10_EventLoop_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_10_EventLoop_9__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_10_EventLoop_8__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__EventLoop = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._EventLoop", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__EventLoop, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  "_EventLoop()", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__EventLoop, /*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_5capnp_3lib_5capnp_10_EventLoop_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__EventLoop, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Timer __pyx_vtable_5capnp_3lib_5capnp__Timer;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Timer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__Timer *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_5capnp_3lib_5capnp__Timer *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__Timer;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__Timer(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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 PyMethodDef __pyx_methods_5capnp_3lib_5capnp__Timer[] = {
  {"after_delay", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_6_Timer_1after_delay, METH_O, __pyx_doc_5capnp_3lib_5capnp_6_Timer_after_delay},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_6_Timer_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_6_Timer_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_6_Timer_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_6_Timer_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__Timer = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._Timer", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__Timer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__Timer, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__Timer, /*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_5capnp_3lib_5capnp__Timer, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__CallContext __pyx_vtable_5capnp_3lib_5capnp__CallContext;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__CallContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__CallContext *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_5capnp_3lib_5capnp__CallContext *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__CallContext;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__CallContext(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_12_CallContext_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_12_CallContext_params(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_12_CallContext_6params_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_12_CallContext_results(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_12_CallContext_7results_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__CallContext[] = {
  {"_get_results", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_3_get_results, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_12_CallContext_2_get_results},
  {"release_params", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_5release_params, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12_CallContext_4release_params},
  {"allow_cancellation", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_7allow_cancellation, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12_CallContext_6allow_cancellation},
  {"tail_call", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_9tail_call, METH_O, __pyx_doc_5capnp_3lib_5capnp_12_CallContext_8tail_call},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_11__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12_CallContext_10__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_CallContext_13__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_12_CallContext_12__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__CallContext[] = {
  {(char *)"params", __pyx_getprop_5capnp_3lib_5capnp_12_CallContext_params, 0, (char *)0, 0},
  {(char *)"results", __pyx_getprop_5capnp_3lib_5capnp_12_CallContext_results, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__CallContext = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._CallContext", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__CallContext), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__CallContext, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__CallContext, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__CallContext, /*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_5capnp_3lib_5capnp__CallContext, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Promise __pyx_vtable_5capnp_3lib_5capnp__Promise;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Promise(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__Promise *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_5capnp_3lib_5capnp__Promise *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__Promise;
  p->_parent = Py_None; Py_INCREF(Py_None);
  p->_obj = Py_None; Py_INCREF(Py_None);
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__Promise(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__Promise *p = (struct __pyx_obj_5capnp_3lib_5capnp__Promise *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_8_Promise_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_parent);
  Py_CLEAR(p->_obj);
  Py_CLEAR(p->_event_loop);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__Promise(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__Promise *p = (struct __pyx_obj_5capnp_3lib_5capnp__Promise *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  if (p->_obj) {
    e = (*v)(p->_obj, a); if (e) return e;
  }
  if (p->_event_loop) {
    e = (*v)(((PyObject *)p->_event_loop), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__Promise(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__Promise *p = (struct __pyx_obj_5capnp_3lib_5capnp__Promise *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_obj);
  p->_obj = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_event_loop);
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_8_Promise_is_consumed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_8_Promise_11is_consumed_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_8_Promise_is_consumed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_8_Promise_11is_consumed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_8_Promise__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_8_Promise_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_8_Promise__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_8_Promise_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_8_Promise_7_parent_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_8_Promise__obj(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_8_Promise_4_obj_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_8_Promise__obj(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_8_Promise_4_obj_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_8_Promise_4_obj_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__Promise[] = {
  {"wait", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_8_Promise_5wait, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_8_Promise_4wait},
  {"then", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_8_Promise_7then, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_8_Promise_6then},
  {"attach", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_8_Promise_9attach, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_8_Promise_8attach},
  {"cancel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_8_Promise_11cancel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_8_Promise_10cancel},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_8_Promise_13__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_8_Promise_12__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_8_Promise_15__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_8_Promise_14__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__Promise[] = {
  {(char *)"is_consumed", __pyx_getprop_5capnp_3lib_5capnp_8_Promise_is_consumed, __pyx_setprop_5capnp_3lib_5capnp_8_Promise_is_consumed, (char *)"is_consumed: 'bool'", 0},
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_8_Promise__parent, __pyx_setprop_5capnp_3lib_5capnp_8_Promise__parent, (char *)"_parent: object", 0},
  {(char *)"_obj", __pyx_getprop_5capnp_3lib_5capnp_8_Promise__obj, __pyx_setprop_5capnp_3lib_5capnp_8_Promise__obj, (char *)"_obj: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__Promise = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._Promise", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__Promise), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__Promise, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_Promise(obj=None)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__Promise, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__Promise, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__Promise, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__Promise, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_8_Promise_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__Promise, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__VoidPromise __pyx_vtable_5capnp_3lib_5capnp__VoidPromise;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__VoidPromise(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *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_5capnp_3lib_5capnp__VoidPromise *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__VoidPromise;
  p->_parent = Py_None; Py_INCREF(Py_None);
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__VoidPromise(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *p = (struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_parent);
  Py_CLEAR(p->_event_loop);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__VoidPromise(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *p = (struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  if (p->_event_loop) {
    e = (*v)(((PyObject *)p->_event_loop), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__VoidPromise(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *p = (struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_event_loop);
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_12_VoidPromise_is_consumed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_12_VoidPromise_is_consumed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_11is_consumed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_12_VoidPromise__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_12_VoidPromise__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__VoidPromise[] = {
  {"wait", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_5wait, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_4wait},
  {"then", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_7then, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_6then},
  {"as_pypromise", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_9as_pypromise, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_8as_pypromise},
  {"attach", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_11attach, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_10attach},
  {"cancel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_13cancel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_12cancel},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_15__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_14__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_17__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_12_VoidPromise_16__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__VoidPromise[] = {
  {(char *)"is_consumed", __pyx_getprop_5capnp_3lib_5capnp_12_VoidPromise_is_consumed, __pyx_setprop_5capnp_3lib_5capnp_12_VoidPromise_is_consumed, (char *)"is_consumed: 'bool'", 0},
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_12_VoidPromise__parent, __pyx_setprop_5capnp_3lib_5capnp_12_VoidPromise__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__VoidPromise = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._VoidPromise", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__VoidPromise, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_VoidPromise()", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__VoidPromise, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__VoidPromise, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__VoidPromise, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__VoidPromise, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_12_VoidPromise_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__VoidPromise, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__RemotePromise __pyx_vtable_5capnp_3lib_5capnp__RemotePromise;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__RemotePromise(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *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_5capnp_3lib_5capnp__RemotePromise *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__RemotePromise;
  p->_parent = Py_None; Py_INCREF(Py_None);
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__RemotePromise(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *p = (struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_parent);
  Py_CLEAR(p->_event_loop);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__RemotePromise(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *p = (struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  if (p->_event_loop) {
    e = (*v)(((PyObject *)p->_event_loop), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__RemotePromise(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *p = (struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_event_loop);
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_getattro_5capnp_3lib_5capnp__RemotePromise(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_18__getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14_RemotePromise_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_6schema_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14_RemotePromise_is_consumed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14_RemotePromise_is_consumed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_11is_consumed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14_RemotePromise__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14_RemotePromise__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__RemotePromise[] = {
  {"_wait", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_5_wait, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_4_wait},
  {"wait", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_7wait, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_6wait},
  {"a_wait", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_9a_wait, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_8a_wait},
  {"as_pypromise", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_12as_pypromise, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_11as_pypromise},
  {"then", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_14then, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_13then},
  {"_get", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_16_get, METH_O, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_15_get},
  {"__getattr__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_18__getattr__, METH_O|METH_COEXIST, 0},
  {"__dir__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_20__dir__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_19__dir__},
  {"to_dict", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_22to_dict, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_21to_dict},
  {"cancel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_24cancel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_23cancel},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_26__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_25__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_28__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_14_RemotePromise_27__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__RemotePromise[] = {
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_14_RemotePromise_schema, 0, (char *)"A property that returns the _StructSchema object matching this reader", 0},
  {(char *)"is_consumed", __pyx_getprop_5capnp_3lib_5capnp_14_RemotePromise_is_consumed, __pyx_setprop_5capnp_3lib_5capnp_14_RemotePromise_is_consumed, (char *)"is_consumed: 'bool'", 0},
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_14_RemotePromise__parent, __pyx_setprop_5capnp_3lib_5capnp_14_RemotePromise__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__RemotePromise = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._RemotePromise", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__RemotePromise, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  __pyx_tp_getattro_5capnp_3lib_5capnp__RemotePromise, /*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*/
  "_RemotePromise()", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__RemotePromise, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__RemotePromise, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__RemotePromise, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__RemotePromise, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_14_RemotePromise_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__RemotePromise, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Request __pyx_vtable_5capnp_3lib_5capnp__Request;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Request(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__Request *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__DynamicStructBuilder(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__Request *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructBuilder*)__pyx_vtabptr_5capnp_3lib_5capnp__Request;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__Request(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_8_Request_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicStructBuilder(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_8_Request_is_consumed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_8_Request_11is_consumed_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_8_Request_is_consumed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_8_Request_11is_consumed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__Request[] = {
  {"send", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_8_Request_3send, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_8_Request_2send},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__Request[] = {
  {(char *)"is_consumed", __pyx_getprop_5capnp_3lib_5capnp_8_Request_is_consumed, __pyx_setprop_5capnp_3lib_5capnp_8_Request_is_consumed, (char *)"is_consumed: 'bool'", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__Request = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._Request", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__Request), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__Request, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_51__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_5capnp_3lib_5capnp_21_DynamicStructBuilder_49__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_5capnp_3lib_5capnp__DynamicStructBuilder, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicStructBuilder, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__Request, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__Request, /*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_5capnp_3lib_5capnp__Request, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__Response __pyx_vtable_5capnp_3lib_5capnp__Response;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__Response(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__Response *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__DynamicStructReader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__Response *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicStructReader*)__pyx_vtabptr_5capnp_3lib_5capnp__Response;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__Response(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_9_Response_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicStructReader(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__Response[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__Response = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._Response", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__Response), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__Response, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_19__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_5capnp_3lib_5capnp_20_DynamicStructReader_17__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  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_5capnp_3lib_5capnp__DynamicStructReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicStructReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__Response, /*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_5capnp_3lib_5capnp__Response, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicCapabilityServer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *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_5capnp_3lib_5capnp__DynamicCapabilityServer *)o);
  p->schema = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)Py_None); Py_INCREF(Py_None);
  p->server = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicCapabilityServer(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->schema);
  Py_CLEAR(p->server);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicCapabilityServer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)o;
  if (p->schema) {
    e = (*v)(((PyObject *)p->schema), a); if (e) return e;
  }
  if (p->server) {
    e = (*v)(p->server, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicCapabilityServer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer *)o;
  tmp = ((PyObject*)p->schema);
  p->schema = ((struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->server);
  p->server = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_getattro_5capnp_3lib_5capnp__DynamicCapabilityServer(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_3__getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityServer_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityServer_schema(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6schema_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityServer_server(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityServer_server(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6server_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicCapabilityServer[] = {
  {"__getattr__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_3__getattr__, METH_O|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityServer_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityServer_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicCapabilityServer[] = {
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityServer_schema, __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityServer_schema, (char *)"schema: capnp.lib.capnp._InterfaceSchema", 0},
  {(char *)"server", __pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityServer_server, __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityServer_server, (char *)"server: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicCapabilityServer = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicCapabilityServer", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityServer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicCapabilityServer, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  __pyx_tp_getattro_5capnp_3lib_5capnp__DynamicCapabilityServer, /*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*/
  "_DynamicCapabilityServer(schema, server)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicCapabilityServer, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicCapabilityServer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicCapabilityServer, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicCapabilityServer, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityServer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__DynamicCapabilityServer, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__DynamicCapabilityClient __pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__DynamicCapabilityClient(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *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_5capnp_3lib_5capnp__DynamicCapabilityClient *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__DynamicCapabilityClient;
  new((void*)&(p->thisptr))  ::capnp::DynamicCapability::Client();
  p->_server = Py_None; Py_INCREF(Py_None);
  p->_parent = Py_None; Py_INCREF(Py_None);
  p->_cached_schema = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicCapabilityClient(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->_server);
  Py_CLEAR(p->_parent);
  Py_CLEAR(p->_cached_schema);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__DynamicCapabilityClient(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)o;
  if (p->_server) {
    e = (*v)(p->_server, a); if (e) return e;
  }
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  if (p->_cached_schema) {
    e = (*v)(p->_cached_schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__DynamicCapabilityClient(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *p = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *)o;
  tmp = ((PyObject*)p->_server);
  p->_server = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cached_schema);
  p->_cached_schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_getattro_5capnp_3lib_5capnp__DynamicCapabilityClient(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_11__getattr__(o, n);
  }
  return v;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6schema_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__server(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__server(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_server_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_parent_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__cached_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__cached_schema(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14_cached_schema_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__DynamicCapabilityClient[] = {
  {"_find_method_args", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_1_find_method_args, METH_O, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient__find_method_args},
  {"_send_helper", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_3_send_helper, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_2_send_helper},
  {"_request_helper", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_5_request_helper, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_4_request_helper},
  {"_request", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_7_request, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_6_request},
  {"_send", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_9_send, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_8_send},
  {"__getattr__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_11__getattr__, METH_O|METH_COEXIST, 0},
  {"upcast", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_13upcast, METH_O, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_12upcast},
  {"cast_as", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_15cast_as, METH_O, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_14cast_as},
  {"__dir__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_17__dir__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_16__dir__},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_19__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_18__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_24_DynamicCapabilityClient_21__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_24_DynamicCapabilityClient_20__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__DynamicCapabilityClient[] = {
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient_schema, 0, (char *)"A property that returns the _InterfaceSchema object matching this client", 0},
  {(char *)"_server", __pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__server, __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__server, (char *)"_server: object", 0},
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__parent, __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__parent, (char *)"_parent: object", 0},
  {(char *)"_cached_schema", __pyx_getprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__cached_schema, __pyx_setprop_5capnp_3lib_5capnp_24_DynamicCapabilityClient__cached_schema, (char *)"_cached_schema: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__DynamicCapabilityClient = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._DynamicCapabilityClient", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__DynamicCapabilityClient, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  __pyx_tp_getattro_5capnp_3lib_5capnp__DynamicCapabilityClient, /*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_5capnp_3lib_5capnp__DynamicCapabilityClient, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__DynamicCapabilityClient, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__DynamicCapabilityClient, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__DynamicCapabilityClient, /*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_5capnp_3lib_5capnp__DynamicCapabilityClient, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__CapabilityClient __pyx_vtable_5capnp_3lib_5capnp__CapabilityClient;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__CapabilityClient(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *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_5capnp_3lib_5capnp__CapabilityClient *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__CapabilityClient;
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__CapabilityClient(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *p = (struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__CapabilityClient(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *p = (struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__CapabilityClient(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *p = (struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_17_CapabilityClient__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_17_CapabilityClient__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__CapabilityClient[] = {
  {"cast_as", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_3cast_as, METH_O, __pyx_doc_5capnp_3lib_5capnp_17_CapabilityClient_2cast_as},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_17_CapabilityClient_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_17_CapabilityClient_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_17_CapabilityClient_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__CapabilityClient[] = {
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_17_CapabilityClient__parent, __pyx_setprop_5capnp_3lib_5capnp_17_CapabilityClient__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__CapabilityClient = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._CapabilityClient", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__CapabilityClient, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__CapabilityClient, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__CapabilityClient, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__CapabilityClient, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__CapabilityClient, /*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_5capnp_3lib_5capnp__CapabilityClient, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoPartyVatNetwork __pyx_vtable_5capnp_3lib_5capnp__TwoPartyVatNetwork;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__TwoPartyVatNetwork(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *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_5capnp_3lib_5capnp__TwoPartyVatNetwork *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__TwoPartyVatNetwork;
  new((void*)&(p->thisptr))  ::kj::Own< ::capnp::TwoPartyVatNetwork> ();
  p->stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__TwoPartyVatNetwork(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *p = (struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->stream);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__TwoPartyVatNetwork(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *p = (struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)o;
  if (p->stream) {
    e = (*v)(((PyObject *)p->stream), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__TwoPartyVatNetwork(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *p = (struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)o;
  tmp = ((PyObject*)p->stream);
  p->stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__TwoPartyVatNetwork[] = {
  {"on_disconnect", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_1on_disconnect, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_on_disconnect},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._TwoPartyVatNetwork", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__TwoPartyVatNetwork, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__TwoPartyVatNetwork, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__TwoPartyVatNetwork, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__TwoPartyVatNetwork, /*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_5capnp_3lib_5capnp__TwoPartyVatNetwork, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyClient __pyx_vtable_5capnp_3lib_5capnp_TwoPartyClient;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_TwoPartyClient(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *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_5capnp_3lib_5capnp_TwoPartyClient *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp_TwoPartyClient;
  p->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)Py_None); Py_INCREF(Py_None);
  p->_orig_stream = Py_None; Py_INCREF(Py_None);
  p->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)Py_None); Py_INCREF(Py_None);
  p->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp_TwoPartyClient(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *p = (struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_network);
  Py_CLEAR(p->_orig_stream);
  Py_CLEAR(p->_stream);
  Py_CLEAR(p->_pipe);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp_TwoPartyClient(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *p = (struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)o;
  if (p->_network) {
    e = (*v)(((PyObject *)p->_network), a); if (e) return e;
  }
  if (p->_orig_stream) {
    e = (*v)(p->_orig_stream, a); if (e) return e;
  }
  if (p->_stream) {
    e = (*v)(((PyObject *)p->_stream), a); if (e) return e;
  }
  if (p->_pipe) {
    e = (*v)(((PyObject *)p->_pipe), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp_TwoPartyClient(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *p = (struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *)o;
  tmp = ((PyObject*)p->_network);
  p->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_orig_stream);
  p->_orig_stream = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_stream);
  p->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pipe);
  p->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyClient__network(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8_network_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyClient__network(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8_network_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_8_network_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyClient__orig_stream(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyClient__orig_stream(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12_orig_stream_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyClient__stream(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyClient__stream(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_7_stream_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyClient__pipe(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyClient__pipe(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_5_pipe_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp_TwoPartyClient[] = {
  {"read", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_3read, METH_O, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_2read},
  {"write", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_6write, METH_O, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_5write},
  {"_connect", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_10_connect, METH_O, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_9_connect},
  {"bootstrap", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_12bootstrap, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_11bootstrap},
  {"on_disconnect", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_14on_disconnect, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_13on_disconnect},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_16__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_15__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_18__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyClient_17__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp_TwoPartyClient[] = {
  {(char *)"_network", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyClient__network, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyClient__network, (char *)"_network: capnp.lib.capnp._TwoPartyVatNetwork", 0},
  {(char *)"_orig_stream", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyClient__orig_stream, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyClient__orig_stream, (char *)"_orig_stream: object", 0},
  {(char *)"_stream", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyClient__stream, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyClient__stream, (char *)"_stream: capnp.lib.capnp._AsyncIoStream", 0},
  {(char *)"_pipe", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyClient__pipe, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyClient__pipe, (char *)"_pipe: capnp.lib.capnp._TwoWayPipe", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp_TwoPartyClient = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.TwoPartyClient", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp_TwoPartyClient, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "TwoPartyClient(socket=None, traversal_limit_in_words=None, nesting_limit=None)\n\n    TwoPartyClient for RPC Communication\n\n    Can be initialized using a socket wrapper (libcapnp) or using asyncio controlled sockets.\n\n    :param socket: Can be a string defining a socket (e.g. localhost:12345) or a file descriptor for a socket.\n                   Passes socket directly to libcapnp. Do not use with asyncio.\n    :param traversal_limit_in_words: Pointer derefence limit (see https://capnproto.org/cxx.html).\n    :param nesting_limit: Recursive limit when reading types (see https://capnproto.org/cxx.html).\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp_TwoPartyClient, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp_TwoPartyClient, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp_TwoPartyClient, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp_TwoPartyClient, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_14TwoPartyClient_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp_TwoPartyClient, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp_TwoPartyServer __pyx_vtable_5capnp_3lib_5capnp_TwoPartyServer;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_TwoPartyServer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *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_5capnp_3lib_5capnp_TwoPartyServer *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp_TwoPartyServer;
  new((void*)&(p->_error_handler)) ErrorHandler();
  p->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)Py_None); Py_INCREF(Py_None);
  p->_orig_stream = Py_None; Py_INCREF(Py_None);
  p->_disconnect_promise = Py_None; Py_INCREF(Py_None);
  p->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)Py_None); Py_INCREF(Py_None);
  p->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)Py_None); Py_INCREF(Py_None);
  p->_port = Py_None; Py_INCREF(Py_None);
  p->port_promise = Py_None; Py_INCREF(Py_None);
  p->_bootstrap = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp_TwoPartyServer(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *p = (struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_13__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->_error_handler);
  Py_CLEAR(p->_network);
  Py_CLEAR(p->_orig_stream);
  Py_CLEAR(p->_disconnect_promise);
  Py_CLEAR(p->_stream);
  Py_CLEAR(p->_pipe);
  Py_CLEAR(p->_port);
  Py_CLEAR(p->port_promise);
  Py_CLEAR(p->_bootstrap);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp_TwoPartyServer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *p = (struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)o;
  if (p->_network) {
    e = (*v)(((PyObject *)p->_network), a); if (e) return e;
  }
  if (p->_orig_stream) {
    e = (*v)(p->_orig_stream, a); if (e) return e;
  }
  if (p->_disconnect_promise) {
    e = (*v)(p->_disconnect_promise, a); if (e) return e;
  }
  if (p->_stream) {
    e = (*v)(((PyObject *)p->_stream), a); if (e) return e;
  }
  if (p->_pipe) {
    e = (*v)(((PyObject *)p->_pipe), a); if (e) return e;
  }
  if (p->_port) {
    e = (*v)(p->_port, a); if (e) return e;
  }
  if (p->port_promise) {
    e = (*v)(p->port_promise, a); if (e) return e;
  }
  if (p->_bootstrap) {
    e = (*v)(p->_bootstrap, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp_TwoPartyServer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *p = (struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *)o;
  tmp = ((PyObject*)p->_network);
  p->_network = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_orig_stream);
  p->_orig_stream = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_disconnect_promise);
  p->_disconnect_promise = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_stream);
  p->_stream = ((struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_pipe);
  p->_pipe = ((struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_port);
  p->_port = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->port_promise);
  p->port_promise = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_bootstrap);
  p->_bootstrap = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer_port(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_4port_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__network(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_8_network_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__network(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_8_network_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_8_network_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__orig_stream(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__orig_stream(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12_orig_stream_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__disconnect_promise(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__disconnect_promise(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19_disconnect_promise_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__stream(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__stream(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_7_stream_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__pipe(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__pipe(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_5_pipe_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer_port_promise(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer_port_promise(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_12port_promise_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__bootstrap(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__bootstrap(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_10_bootstrap_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp_TwoPartyServer[] = {
  {"read", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_3read, METH_O, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_2read},
  {"write", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_6write, METH_O, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_5write},
  {"_connect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_9_connect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_8_connect},
  {"_decref", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_11_decref, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_10_decref},
  {"on_disconnect", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_15on_disconnect, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_14on_disconnect},
  {"poll_once", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_17poll_once, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_16poll_once},
  {"poll_forever", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_19poll_forever, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_18poll_forever},
  {"run_forever", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_22run_forever, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_21run_forever},
  {"bootstrap", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_24bootstrap, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_23bootstrap},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_26__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_25__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_28__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_14TwoPartyServer_27__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp_TwoPartyServer[] = {
  {(char *)"port", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer_port, 0, (char *)0, 0},
  {(char *)"_network", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__network, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__network, (char *)"_network: capnp.lib.capnp._TwoPartyVatNetwork", 0},
  {(char *)"_orig_stream", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__orig_stream, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__orig_stream, (char *)"_orig_stream: object", 0},
  {(char *)"_disconnect_promise", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__disconnect_promise, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__disconnect_promise, (char *)"_disconnect_promise: object", 0},
  {(char *)"_stream", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__stream, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__stream, (char *)"_stream: capnp.lib.capnp._AsyncIoStream", 0},
  {(char *)"_pipe", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__pipe, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__pipe, (char *)"_pipe: capnp.lib.capnp._TwoWayPipe", 0},
  {(char *)"port_promise", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer_port_promise, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer_port_promise, (char *)"port_promise: object", 0},
  {(char *)"_bootstrap", __pyx_getprop_5capnp_3lib_5capnp_14TwoPartyServer__bootstrap, __pyx_setprop_5capnp_3lib_5capnp_14TwoPartyServer__bootstrap, (char *)"_bootstrap: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp_TwoPartyServer = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.TwoPartyServer", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp_TwoPartyServer, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "TwoPartyServer(socket=None, bootstrap=None, traversal_limit_in_words=None, nesting_limit=None)\n\n    TwoPartyServer for RPC Communication\n\n    Can be initialized using a socket wrapper (libcapnp) or using asyncio controlled sockets.\n\n    :param socket: Can be a string defining a socket (e.g. localhost:12345, also supports \\*:12345)\n                   or a file descriptor for a socket.\n                   Passes socket directly to libcapnp. Do not use with asyncio.\n    :param bootstrap: Class object defining the implementation of the Cap'n'proto interface.\n    :param traversal_limit_in_words: Pointer derefence limit (see https://capnproto.org/cxx.html).\n    :param nesting_limit: Recursive limit when reading types (see https://capnproto.org/cxx.html).\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp_TwoPartyServer, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp_TwoPartyServer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp_TwoPartyServer, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp_TwoPartyServer, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_14TwoPartyServer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp_TwoPartyServer, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__AsyncIoStream(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *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_5capnp_3lib_5capnp__AsyncIoStream *)o);
  new((void*)&(p->thisptr))  ::kj::Own< ::kj::AsyncIoStream> ();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__AsyncIoStream(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *p = (struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__AsyncIoStream[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_AsyncIoStream_1__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_AsyncIoStream___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_AsyncIoStream_3__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_14_AsyncIoStream_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__AsyncIoStream = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._AsyncIoStream", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__AsyncIoStream, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__AsyncIoStream, /*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_5capnp_3lib_5capnp__AsyncIoStream, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__TwoWayPipe __pyx_vtable_5capnp_3lib_5capnp__TwoWayPipe;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__TwoWayPipe(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *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_5capnp_3lib_5capnp__TwoWayPipe *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__TwoWayPipe;
  new((void*)&(p->_pipe))  ::kj::TwoWayPipe();
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__TwoWayPipe(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *p = (struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->_pipe);
  Py_CLEAR(p->_event_loop);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__TwoWayPipe(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *p = (struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)o;
  if (p->_event_loop) {
    e = (*v)(((PyObject *)p->_event_loop), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__TwoWayPipe(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *p = (struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *)o;
  tmp = ((PyObject*)p->_event_loop);
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__TwoWayPipe[] = {
  {"_init", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_3_init, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_11_TwoWayPipe_2_init},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_11_TwoWayPipe_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_TwoWayPipe_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_11_TwoWayPipe_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__TwoWayPipe = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._TwoWayPipe", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__TwoWayPipe, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_TwoWayPipe()", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__TwoWayPipe, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__TwoWayPipe, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__TwoWayPipe, /*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_5capnp_3lib_5capnp_11_TwoWayPipe_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__TwoWayPipe, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__FdAsyncIoStream __pyx_vtable_5capnp_3lib_5capnp__FdAsyncIoStream;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__FdAsyncIoStream(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__AsyncIoStream(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__FdAsyncIoStream;
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__FdAsyncIoStream(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *p = (struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_event_loop);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__AsyncIoStream(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__FdAsyncIoStream(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *p = (struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *)o;
  e = ((likely(__pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream)) ? ((__pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream->tp_traverse) ? __pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5capnp_3lib_5capnp__FdAsyncIoStream)); if (e) return e;
  if (p->_event_loop) {
    e = (*v)(((PyObject *)p->_event_loop), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__FdAsyncIoStream(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *p = (struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *)o;
  if (likely(__pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream)) { if (__pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream->tp_clear) __pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5capnp_3lib_5capnp__FdAsyncIoStream);
  tmp = ((PyObject*)p->_event_loop);
  p->_event_loop = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__FdAsyncIoStream[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_16_FdAsyncIoStream_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_16_FdAsyncIoStream_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_16_FdAsyncIoStream_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_16_FdAsyncIoStream_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._FdAsyncIoStream", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__FdAsyncIoStream, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_FdAsyncIoStream(int fd)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__FdAsyncIoStream, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__FdAsyncIoStream, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__FdAsyncIoStream, /*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_5capnp_3lib_5capnp_16_FdAsyncIoStream_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__FdAsyncIoStream, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_PyAsyncIoStream(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__AsyncIoStream(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp_PyAsyncIoStream[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15PyAsyncIoStream_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_15PyAsyncIoStream_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_15PyAsyncIoStream_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_15PyAsyncIoStream_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.PyAsyncIoStream", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp_PyAsyncIoStream), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__AsyncIoStream, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  "PyAsyncIoStream(int fd)", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp_PyAsyncIoStream, /*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_5capnp_3lib_5capnp_15PyAsyncIoStream_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp_PyAsyncIoStream, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp_PromiseFulfillerPair __pyx_vtable_5capnp_3lib_5capnp_PromiseFulfillerPair;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp_PromiseFulfillerPair(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *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_5capnp_3lib_5capnp_PromiseFulfillerPair *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp_PromiseFulfillerPair;
  new((void*)&(p->thisptr))  ::kj::Own< ::kj::PromiseFulfillerPair<void>> ();
  p->promise = ((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp_PromiseFulfillerPair(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *p = (struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->promise);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp_PromiseFulfillerPair(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *p = (struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)o;
  if (p->promise) {
    e = (*v)(((PyObject *)p->promise), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp_PromiseFulfillerPair(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *p = (struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *)o;
  tmp = ((PyObject*)p->promise);
  p->promise = ((struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_20PromiseFulfillerPair_is_consumed(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_20PromiseFulfillerPair_is_consumed(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_11is_consumed_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_20PromiseFulfillerPair_promise(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_20PromiseFulfillerPair_promise(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7promise_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp_PromiseFulfillerPair[] = {
  {"fulfill", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_3fulfill, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_20PromiseFulfillerPair_2fulfill},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_20PromiseFulfillerPair_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_20PromiseFulfillerPair_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp_PromiseFulfillerPair[] = {
  {(char *)"is_consumed", __pyx_getprop_5capnp_3lib_5capnp_20PromiseFulfillerPair_is_consumed, __pyx_setprop_5capnp_3lib_5capnp_20PromiseFulfillerPair_is_consumed, (char *)"is_consumed: 'bool'", 0},
  {(char *)"promise", __pyx_getprop_5capnp_3lib_5capnp_20PromiseFulfillerPair_promise, __pyx_setprop_5capnp_3lib_5capnp_20PromiseFulfillerPair_promise, (char *)"promise: capnp.lib.capnp._VoidPromise", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.PromiseFulfillerPair", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp_PromiseFulfillerPair, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "PromiseFulfillerPair()", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp_PromiseFulfillerPair, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp_PromiseFulfillerPair, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp_PromiseFulfillerPair, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp_PromiseFulfillerPair, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_20PromiseFulfillerPair_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp_PromiseFulfillerPair, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__StructSchema __pyx_vtable_5capnp_3lib_5capnp__StructSchema;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__StructSchema(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *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_5capnp_3lib_5capnp__StructSchema *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__StructSchema;
  new((void*)&(p->thisptr))  ::capnp::StructSchema();
  p->__pyx___fieldnames = Py_None; Py_INCREF(Py_None);
  p->__pyx___union_fields = Py_None; Py_INCREF(Py_None);
  p->__pyx___non_union_fields = Py_None; Py_INCREF(Py_None);
  p->__pyx___fields = Py_None; Py_INCREF(Py_None);
  p->__pyx___getters = Py_None; Py_INCREF(Py_None);
  p->__pyx___fields_list = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__StructSchema(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *p = (struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  __Pyx_call_destructor(p->thisptr);
  Py_CLEAR(p->__pyx___fieldnames);
  Py_CLEAR(p->__pyx___union_fields);
  Py_CLEAR(p->__pyx___non_union_fields);
  Py_CLEAR(p->__pyx___fields);
  Py_CLEAR(p->__pyx___getters);
  Py_CLEAR(p->__pyx___fields_list);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__StructSchema(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *p = (struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)o;
  if (p->__pyx___fieldnames) {
    e = (*v)(p->__pyx___fieldnames, a); if (e) return e;
  }
  if (p->__pyx___union_fields) {
    e = (*v)(p->__pyx___union_fields, a); if (e) return e;
  }
  if (p->__pyx___non_union_fields) {
    e = (*v)(p->__pyx___non_union_fields, a); if (e) return e;
  }
  if (p->__pyx___fields) {
    e = (*v)(p->__pyx___fields, a); if (e) return e;
  }
  if (p->__pyx___getters) {
    e = (*v)(p->__pyx___getters, a); if (e) return e;
  }
  if (p->__pyx___fields_list) {
    e = (*v)(p->__pyx___fields_list, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__StructSchema(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *p = (struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *)o;
  tmp = ((PyObject*)p->__pyx___fieldnames);
  p->__pyx___fieldnames = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx___union_fields);
  p->__pyx___union_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx___non_union_fields);
  p->__pyx___non_union_fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx___fields);
  p->__pyx___fields = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx___getters);
  p->__pyx___getters = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx___fields_list);
  p->__pyx___fields_list = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_fieldnames(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_13_StructSchema_10fieldnames_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_union_fields(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_13_StructSchema_12union_fields_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_non_union_fields(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_13_StructSchema_16non_union_fields_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_fields(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_13_StructSchema_6fields_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_fields_list(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_13_StructSchema_11fields_list_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_node(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_13_StructSchema_4node_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__StructSchema[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_13_StructSchema_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_13_StructSchema_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_13_StructSchema_6__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__StructSchema[] = {
  {(char *)"fieldnames", __pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_fieldnames, 0, (char *)"A tuple of the field names in the struct.", 0},
  {(char *)"union_fields", __pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_union_fields, 0, (char *)"A tuple of the field names in the struct.", 0},
  {(char *)"non_union_fields", __pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_non_union_fields, 0, (char *)"A tuple of the field names in the struct.", 0},
  {(char *)"fields", __pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_fields, 0, (char *)"All of the _StructSchemaField in this schema as a dict", 0},
  {(char *)"fields_list", __pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_fields_list, 0, (char *)"All of the _StructSchemaField in this schema as a list", 0},
  {(char *)"node", __pyx_getprop_5capnp_3lib_5capnp_13_StructSchema_node, 0, (char *)"The raw schema node", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__StructSchema = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._StructSchema", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__StructSchema, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp_13_StructSchema_3__repr__, /*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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__StructSchema, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__StructSchema, /*tp_clear*/
  __pyx_pw_5capnp_3lib_5capnp_13_StructSchema_1__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__StructSchema, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__StructSchema, /*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_5capnp_3lib_5capnp__StructSchema, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__InterfaceMethod __pyx_vtable_5capnp_3lib_5capnp__InterfaceMethod;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__InterfaceMethod(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *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_5capnp_3lib_5capnp__InterfaceMethod *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__InterfaceMethod;
  new((void*)&(p->thisptr))  ::capnp::InterfaceSchema::Method();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__InterfaceMethod(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *p = (struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_16_InterfaceMethod_param_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_10param_type_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_16_InterfaceMethod_result_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_11result_type_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__InterfaceMethod[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_1__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_16_InterfaceMethod___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_16_InterfaceMethod_3__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_16_InterfaceMethod_2__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__InterfaceMethod[] = {
  {(char *)"param_type", __pyx_getprop_5capnp_3lib_5capnp_16_InterfaceMethod_param_type, 0, (char *)"The type of this method's parameter struct", 0},
  {(char *)"result_type", __pyx_getprop_5capnp_3lib_5capnp_16_InterfaceMethod_result_type, 0, (char *)"The type of this method's result struct", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__InterfaceMethod = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._InterfaceMethod", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__InterfaceMethod, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__InterfaceMethod, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__InterfaceMethod, /*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_5capnp_3lib_5capnp__InterfaceMethod, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__EnumSchema __pyx_vtable_5capnp_3lib_5capnp__EnumSchema;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__EnumSchema(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *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_5capnp_3lib_5capnp__EnumSchema *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__EnumSchema;
  new((void*)&(p->thisptr))  ::capnp::EnumSchema();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__EnumSchema(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *p = (struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_EnumSchema_enumerants(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_10enumerants_1__get__(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_EnumSchema_node(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_4node_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__EnumSchema[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_1__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_11_EnumSchema___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_EnumSchema_3__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_11_EnumSchema_2__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__EnumSchema[] = {
  {(char *)"enumerants", __pyx_getprop_5capnp_3lib_5capnp_11_EnumSchema_enumerants, 0, (char *)"The list of enumerants as a dictionary", 0},
  {(char *)"node", __pyx_getprop_5capnp_3lib_5capnp_11_EnumSchema_node, 0, (char *)"The raw schema node", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__EnumSchema = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._EnumSchema", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__EnumSchema, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__EnumSchema, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__EnumSchema, /*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_5capnp_3lib_5capnp__EnumSchema, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__SchemaType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *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_5capnp_3lib_5capnp__SchemaType *)o);
  new((void*)&(p->thisptr))  ::capnp::Type();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__SchemaType(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *p = (struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__SchemaType[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_SchemaType_1__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_11_SchemaType___reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_SchemaType_3__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_11_SchemaType_2__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__SchemaType = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._SchemaType", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__SchemaType), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__SchemaType, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__SchemaType, /*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_5capnp_3lib_5capnp__SchemaType, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__ListSchema __pyx_vtable_5capnp_3lib_5capnp__ListSchema;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__ListSchema(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *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_5capnp_3lib_5capnp__ListSchema *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__ListSchema;
  new((void*)&(p->thisptr))  ::capnp::ListSchema();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__ListSchema(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *p = (struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_11_ListSchema_elementType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_11_ListSchema_11elementType_1__get__(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__ListSchema[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_ListSchema_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_11_ListSchema_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_ListSchema_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_11_ListSchema_4__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__ListSchema[] = {
  {(char *)"elementType", __pyx_getprop_5capnp_3lib_5capnp_11_ListSchema_elementType, 0, (char *)"The schema of the element type of this list", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__ListSchema = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._ListSchema", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__ListSchema), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__ListSchema, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  "_ListSchema(schema=None)", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__ListSchema, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__ListSchema, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_11_ListSchema_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__ListSchema, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__ParsedSchema __pyx_vtable_5capnp_3lib_5capnp__ParsedSchema;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__ParsedSchema(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__Schema(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__Schema*)__pyx_vtabptr_5capnp_3lib_5capnp__ParsedSchema;
  new((void*)&(p->thisptr_child))  ::capnp::ParsedSchema();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__ParsedSchema(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *p = (struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  __Pyx_call_destructor(p->thisptr_child);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__Schema(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__ParsedSchema[] = {
  {"get_nested", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_1get_nested, METH_O, __pyx_doc_5capnp_3lib_5capnp_13_ParsedSchema_get_nested},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_13_ParsedSchema_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_13_ParsedSchema_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_13_ParsedSchema_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__ParsedSchema = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._ParsedSchema", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__ParsedSchema, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp__ParsedSchema, /*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_5capnp_3lib_5capnp__ParsedSchema, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__MallocMessageBuilder __pyx_vtable_5capnp_3lib_5capnp__MallocMessageBuilder;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MallocMessageBuilder(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageBuilder(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder*)__pyx_vtabptr_5capnp_3lib_5capnp__MallocMessageBuilder;
  return o;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__MallocMessageBuilder[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_MallocMessageBuilder_3__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_21_MallocMessageBuilder_2__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21_MallocMessageBuilder_5__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_21_MallocMessageBuilder_4__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._MallocMessageBuilder", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__MallocMessageBuilder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageBuilder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  "_MallocMessageBuilder(size=None)\nThe main class for building Cap'n Proto messages\n\n    You will use this class to handle arena allocation of the Cap'n Proto\n    messages. You also use this object when you're done assigning to Cap'n\n    Proto objects, and wish to serialize them::\n\n        addressbook = capnp.load('addressbook.capnp')\n        message = capnp._MallocMessageBuilder()\n        person = message.init_root(addressbook.Person)\n        person.name = 'alice'\n        ...\n        f = open('out.txt', 'w')\n        _write_message_to_fd(f.fileno(), message)\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__MallocMessageBuilder, /*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_5capnp_3lib_5capnp_21_MallocMessageBuilder_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__MallocMessageBuilder, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader __pyx_vtable_5capnp_3lib_5capnp__MessageReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MessageReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *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_5capnp_3lib_5capnp__MessageReader *)o);
  p->__pyx_vtab = __pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;
  p->_parent = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_parent);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)o;
  if (p->_parent) {
    e = (*v)(p->_parent, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *)o;
  tmp = ((PyObject*)p->_parent);
  p->_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_14_MessageReader__parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7_parent_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_14_MessageReader__parent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7_parent_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7_parent_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__MessageReader[] = {
  {"get_root", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_3get_root, METH_O, __pyx_doc_5capnp_3lib_5capnp_14_MessageReader_2get_root},
  {"get_root_as_any", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_5get_root_as_any, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_MessageReader_4get_root_as_any},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_7__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_MessageReader_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_MessageReader_9__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_14_MessageReader_8__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__MessageReader[] = {
  {(char *)"_parent", __pyx_getprop_5capnp_3lib_5capnp_14_MessageReader__parent, __pyx_setprop_5capnp_3lib_5capnp_14_MessageReader__parent, (char *)"_parent: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__MessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._MessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_MessageReader()\nAn abstract base class for reading Cap'n Proto messages\n\n    .. warning:: Don't ever instantiate this class. It is only used for inheritance.\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__MessageReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__MessageReader, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_14_MessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__MessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__StreamFdMessageReader __pyx_vtable_5capnp_3lib_5capnp__StreamFdMessageReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__StreamFdMessageReader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageReader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader*)__pyx_vtabptr_5capnp_3lib_5capnp__StreamFdMessageReader;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__StreamFdMessageReader(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__StreamFdMessageReader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_22_StreamFdMessageReader_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_StreamFdMessageReader_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_22_StreamFdMessageReader_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._StreamFdMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__StreamFdMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__StreamFdMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_StreamFdMessageReader(file, traversal_limit_in_words=None, nesting_limit=None)\nRead a Cap'n Proto message from a file descriptor\n\n    You use this class to for reading message(s) from a file. It's analagous to the inverse of :func:`_write_message_to_fd` and :class:`_MessageBuilder`, but in one class::\n\n        f = open('out.txt')\n        message = _StreamFdMessageReader(f)\n        person = message.get_root(addressbook.Person)\n        print person.name\n\n    :Parameters: - fd (`int`) - A file descriptor\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__StreamFdMessageReader, /*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_5capnp_3lib_5capnp_22_StreamFdMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__StreamFdMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedMessageReader __pyx_vtable_5capnp_3lib_5capnp__PackedMessageReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__PackedMessageReader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageReader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader*)__pyx_vtabptr_5capnp_3lib_5capnp__PackedMessageReader;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__PackedMessageReader(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__PackedMessageReader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_20_PackedMessageReader_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_20_PackedMessageReader_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_20_PackedMessageReader_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__PackedMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._PackedMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__PackedMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_PackedMessageReader()\nRead a Cap'n Proto message from a file descriptor in a packed manner\n\n    You use this class to for reading message(s) from a file. It's analagous to the inverse of :func:`_write_packed_message_to_fd` and :class:`_MessageBuilder`, but in one class.::\n\n        f = open('out.txt')\n        message = _PackedFdMessageReader(f)\n        person = message.get_root(addressbook.Person)\n        print person.name\n\n    :Parameters: - fd (`int`) - A file descriptor\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__PackedMessageReader, /*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_5capnp_3lib_5capnp_20_PackedMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__PackedMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedMessageReaderBytes __pyx_vtable_5capnp_3lib_5capnp__PackedMessageReaderBytes;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__PackedMessageReaderBytes(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageReader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader*)__pyx_vtabptr_5capnp_3lib_5capnp__PackedMessageReaderBytes;
  p->view.obj = NULL;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__PackedMessageReaderBytes(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__PackedMessageReaderBytes[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._PackedMessageReaderBytes", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReaderBytes), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__PackedMessageReaderBytes, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_PackedMessageReaderBytes(buf, traversal_limit_in_words=None, nesting_limit=None)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__PackedMessageReaderBytes, /*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_5capnp_3lib_5capnp_25_PackedMessageReaderBytes_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__PackedMessageReaderBytes, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__InputMessageReader __pyx_vtable_5capnp_3lib_5capnp__InputMessageReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__InputMessageReader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageReader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader*)__pyx_vtabptr_5capnp_3lib_5capnp__InputMessageReader;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__InputMessageReader(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__InputMessageReader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_19_InputMessageReader_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_InputMessageReader_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_19_InputMessageReader_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__InputMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._InputMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__InputMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_InputMessageReader()\nRead a Cap'n Proto message from a file descriptor in a packed manner\n\n    You use this class to for reading message(s) from a file. It's analagous to the inverse of :func:`_write_packed_message_to_fd` and :class:`_MessageBuilder`, but in one class.::\n\n        f = open('out.txt')\n        message = _PackedFdMessageReader(f)\n        person = message.get_root(addressbook.Person)\n        print person.name\n\n    :Parameters: - fd (`int`) - A file descriptor\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__InputMessageReader, /*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_5capnp_3lib_5capnp_19_InputMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__InputMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__PackedFdMessageReader __pyx_vtable_5capnp_3lib_5capnp__PackedFdMessageReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__PackedFdMessageReader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageReader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader*)__pyx_vtabptr_5capnp_3lib_5capnp__PackedFdMessageReader;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__PackedFdMessageReader(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__PackedFdMessageReader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_22_PackedFdMessageReader_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_PackedFdMessageReader_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_22_PackedFdMessageReader_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._PackedFdMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__PackedFdMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__PackedFdMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_PackedFdMessageReader(file, traversal_limit_in_words=None, nesting_limit=None)\nRead a Cap'n Proto message from a file descriptor in a packed manner\n\n    You use this class to for reading message(s) from a file. It's analagous to the inverse of :func:`_write_packed_message_to_fd` and :class:`_MessageBuilder`, but in one class.::\n\n        f = open('out.txt')\n        message = _PackedFdMessageReader(f)\n        person = message.get_root(addressbook.Person)\n        print person.name\n\n    :Parameters: - fd (`int`) - A file descriptor\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__PackedFdMessageReader, /*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_5capnp_3lib_5capnp_22_PackedFdMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__PackedFdMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MultipleMessageReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *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_5capnp_3lib_5capnp__MultipleMessageReader *)o);
  p->traversal_limit_in_words = Py_None; Py_INCREF(Py_None);
  p->nesting_limit = Py_None; Py_INCREF(Py_None);
  p->schema = Py_None; Py_INCREF(Py_None);
  p->file = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__MultipleMessageReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->traversal_limit_in_words);
  Py_CLEAR(p->nesting_limit);
  Py_CLEAR(p->schema);
  Py_CLEAR(p->file);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__MultipleMessageReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)o;
  if (p->traversal_limit_in_words) {
    e = (*v)(p->traversal_limit_in_words, a); if (e) return e;
  }
  if (p->nesting_limit) {
    e = (*v)(p->nesting_limit, a); if (e) return e;
  }
  if (p->schema) {
    e = (*v)(p->schema, a); if (e) return e;
  }
  if (p->file) {
    e = (*v)(p->file, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__MultipleMessageReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader *)o;
  tmp = ((PyObject*)p->traversal_limit_in_words);
  p->traversal_limit_in_words = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nesting_limit);
  p->nesting_limit = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->schema);
  p->schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->file);
  p->file = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_22_MultipleMessageReader_traversal_limit_in_words(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_22_MultipleMessageReader_traversal_limit_in_words(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_24traversal_limit_in_words_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_22_MultipleMessageReader_nesting_limit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_22_MultipleMessageReader_nesting_limit(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_13nesting_limit_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_22_MultipleMessageReader_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_22_MultipleMessageReader_schema(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_6schema_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_22_MultipleMessageReader_file(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_22_MultipleMessageReader_file(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_4file_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_5__next__(self);}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__MultipleMessageReader[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_9__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_22_MultipleMessageReader_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_11__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_22_MultipleMessageReader_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__MultipleMessageReader[] = {
  {(char *)"traversal_limit_in_words", __pyx_getprop_5capnp_3lib_5capnp_22_MultipleMessageReader_traversal_limit_in_words, __pyx_setprop_5capnp_3lib_5capnp_22_MultipleMessageReader_traversal_limit_in_words, (char *)"traversal_limit_in_words: object", 0},
  {(char *)"nesting_limit", __pyx_getprop_5capnp_3lib_5capnp_22_MultipleMessageReader_nesting_limit, __pyx_setprop_5capnp_3lib_5capnp_22_MultipleMessageReader_nesting_limit, (char *)"nesting_limit: object", 0},
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_22_MultipleMessageReader_schema, __pyx_setprop_5capnp_3lib_5capnp_22_MultipleMessageReader_schema, (char *)"schema: object", 0},
  {(char *)"file", __pyx_getprop_5capnp_3lib_5capnp_22_MultipleMessageReader_file, __pyx_setprop_5capnp_3lib_5capnp_22_MultipleMessageReader_file, (char *)"file: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__MultipleMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._MultipleMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__MultipleMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MultipleMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_MultipleMessageReader(file, schema, traversal_limit_in_words=None, nesting_limit=None, skip_copy=False)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MultipleMessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MultipleMessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_7__iter__, /*tp_iter*/
  __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_5__next__, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__MultipleMessageReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__MultipleMessageReader, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_22_MultipleMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__MultipleMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MultiplePackedMessageReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *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_5capnp_3lib_5capnp__MultiplePackedMessageReader *)o);
  p->traversal_limit_in_words = Py_None; Py_INCREF(Py_None);
  p->nesting_limit = Py_None; Py_INCREF(Py_None);
  p->schema = Py_None; Py_INCREF(Py_None);
  p->file = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__MultiplePackedMessageReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->traversal_limit_in_words);
  Py_CLEAR(p->nesting_limit);
  Py_CLEAR(p->schema);
  Py_CLEAR(p->file);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__MultiplePackedMessageReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)o;
  if (p->traversal_limit_in_words) {
    e = (*v)(p->traversal_limit_in_words, a); if (e) return e;
  }
  if (p->nesting_limit) {
    e = (*v)(p->nesting_limit, a); if (e) return e;
  }
  if (p->schema) {
    e = (*v)(p->schema, a); if (e) return e;
  }
  if (p->file) {
    e = (*v)(p->file, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__MultiplePackedMessageReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader *)o;
  tmp = ((PyObject*)p->traversal_limit_in_words);
  p->traversal_limit_in_words = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nesting_limit);
  p->nesting_limit = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->schema);
  p->schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->file);
  p->file = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_traversal_limit_in_words(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_traversal_limit_in_words(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_24traversal_limit_in_words_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_nesting_limit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_nesting_limit(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_13nesting_limit_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_schema(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_6schema_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_file(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_file(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_4file_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_5__next__(self);}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__MultiplePackedMessageReader[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_9__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_11__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__MultiplePackedMessageReader[] = {
  {(char *)"traversal_limit_in_words", __pyx_getprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_traversal_limit_in_words, __pyx_setprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_traversal_limit_in_words, (char *)"traversal_limit_in_words: object", 0},
  {(char *)"nesting_limit", __pyx_getprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_nesting_limit, __pyx_setprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_nesting_limit, (char *)"nesting_limit: object", 0},
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_schema, __pyx_setprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_schema, (char *)"schema: object", 0},
  {(char *)"file", __pyx_getprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_file, __pyx_setprop_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_file, (char *)"file: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__MultiplePackedMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._MultiplePackedMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__MultiplePackedMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MultiplePackedMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_MultiplePackedMessageReader(file, schema, traversal_limit_in_words=None, nesting_limit=None, skip_copy=False)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MultiplePackedMessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MultiplePackedMessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_7__iter__, /*tp_iter*/
  __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_5__next__, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__MultiplePackedMessageReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__MultiplePackedMessageReader, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_28_MultiplePackedMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__MultiplePackedMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MultipleBytesMessageReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *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_5capnp_3lib_5capnp__MultipleBytesMessageReader *)o);
  p->_object_to_pin = Py_None; Py_INCREF(Py_None);
  p->traversal_limit_in_words = Py_None; Py_INCREF(Py_None);
  p->nesting_limit = Py_None; Py_INCREF(Py_None);
  p->schema = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__MultipleBytesMessageReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_object_to_pin);
  Py_CLEAR(p->traversal_limit_in_words);
  Py_CLEAR(p->nesting_limit);
  Py_CLEAR(p->schema);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__MultipleBytesMessageReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)o;
  if (p->_object_to_pin) {
    e = (*v)(p->_object_to_pin, a); if (e) return e;
  }
  if (p->traversal_limit_in_words) {
    e = (*v)(p->traversal_limit_in_words, a); if (e) return e;
  }
  if (p->nesting_limit) {
    e = (*v)(p->nesting_limit, a); if (e) return e;
  }
  if (p->schema) {
    e = (*v)(p->schema, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__MultipleBytesMessageReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader *)o;
  tmp = ((PyObject*)p->_object_to_pin);
  p->_object_to_pin = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->traversal_limit_in_words);
  p->traversal_limit_in_words = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nesting_limit);
  p->nesting_limit = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->schema);
  p->schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_traversal_limit_in_words(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_traversal_limit_in_words(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_24traversal_limit_in_words_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_nesting_limit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_nesting_limit(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_13nesting_limit_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_schema(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6schema_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_3__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_3__next__(self);}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__MultipleBytesMessageReader[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_3__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_7__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_6__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_9__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_8__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__MultipleBytesMessageReader[] = {
  {(char *)"traversal_limit_in_words", __pyx_getprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_traversal_limit_in_words, __pyx_setprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_traversal_limit_in_words, (char *)"traversal_limit_in_words: object", 0},
  {(char *)"nesting_limit", __pyx_getprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_nesting_limit, __pyx_setprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_nesting_limit, (char *)"nesting_limit: object", 0},
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_schema, __pyx_setprop_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_schema, (char *)"schema: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__MultipleBytesMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._MultipleBytesMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MultipleBytesMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_MultipleBytesMessageReader(buf, schema, traversal_limit_in_words=None, nesting_limit=None)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MultipleBytesMessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MultipleBytesMessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_5__iter__, /*tp_iter*/
  __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_3__next__, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__MultipleBytesMessageReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__MultipleBytesMessageReader, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_27_MultipleBytesMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__MultipleBytesMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *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_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)o);
  p->traversal_limit_in_words = Py_None; Py_INCREF(Py_None);
  p->nesting_limit = Py_None; Py_INCREF(Py_None);
  p->schema = Py_None; Py_INCREF(Py_None);
  p->buf = Py_None; Py_INCREF(Py_None);
  p->view.obj = NULL;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->traversal_limit_in_words);
  Py_CLEAR(p->nesting_limit);
  Py_CLEAR(p->schema);
  Py_CLEAR(p->buf);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)o;
  if (p->traversal_limit_in_words) {
    e = (*v)(p->traversal_limit_in_words, a); if (e) return e;
  }
  if (p->nesting_limit) {
    e = (*v)(p->nesting_limit, a); if (e) return e;
  }
  if (p->schema) {
    e = (*v)(p->schema, a); if (e) return e;
  }
  if (p->buf) {
    e = (*v)(p->buf, a); if (e) return e;
  }
  if (p->view.obj) {
    e = (*v)(p->view.obj, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader *)o;
  tmp = ((PyObject*)p->traversal_limit_in_words);
  p->traversal_limit_in_words = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->nesting_limit);
  p->nesting_limit = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->schema);
  p->schema = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->buf);
  p->buf = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  Py_CLEAR(p->view.obj);
  return 0;
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_traversal_limit_in_words(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_traversal_limit_in_words(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_24traversal_limit_in_words_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_nesting_limit(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_nesting_limit(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_13nesting_limit_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_schema(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_schema(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_6schema_5__del__(o);
  }
}

static PyObject *__pyx_getprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_buf(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_1__get__(o);
}

static int __pyx_setprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_buf(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_3__set__(o, v);
  }
  else {
    return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_3buf_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_5__next__(self);}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader[] = {
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_5__next__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_9__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_11__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_10__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader[] = {
  {(char *)"traversal_limit_in_words", __pyx_getprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_traversal_limit_in_words, __pyx_setprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_traversal_limit_in_words, (char *)"traversal_limit_in_words: object", 0},
  {(char *)"nesting_limit", __pyx_getprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_nesting_limit, __pyx_setprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_nesting_limit, (char *)"nesting_limit: object", 0},
  {(char *)"schema", __pyx_getprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_schema, __pyx_setprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_schema, (char *)"schema: object", 0},
  {(char *)"buf", __pyx_getprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_buf, __pyx_setprop_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_buf, (char *)"buf: object", 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._MultipleBytesPackedMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_MultipleBytesPackedMessageReader(buf, schema, traversal_limit_in_words=None, nesting_limit=None)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_7__iter__, /*tp_iter*/
  __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_5__next__, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5capnp_3lib_5capnp_33_MultipleBytesPackedMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__AlignedBuffer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer *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_5capnp_3lib_5capnp__AlignedBuffer *)o);
  p->view.obj = NULL;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__AlignedBuffer(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__AlignedBuffer[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_14_AlignedBuffer_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_14_AlignedBuffer_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_14_AlignedBuffer_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__AlignedBuffer = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._AlignedBuffer", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__AlignedBuffer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__AlignedBuffer, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  "_AlignedBuffer(other)", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__AlignedBuffer, /*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_5capnp_3lib_5capnp_14_AlignedBuffer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__AlignedBuffer, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__BufferView(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__BufferView *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_5capnp_3lib_5capnp__BufferView *)o);
  p->view.obj = NULL;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__BufferView(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && 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);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_11_BufferView_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__BufferView[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_BufferView_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_11_BufferView_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_11_BufferView_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_11_BufferView_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__BufferView = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._BufferView", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__BufferView), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__BufferView, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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*/
  "_BufferView(other)", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__BufferView, /*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_5capnp_3lib_5capnp_11_BufferView_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__BufferView, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned __pyx_vtable_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageReader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader*)__pyx_vtabptr_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned;
  p->_object_to_pin = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *p = (struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_object_to_pin);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *p = (struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)o;
  e = __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader(o, v, a); if (e) return e;
  if (p->_object_to_pin) {
    e = (*v)(p->_object_to_pin, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *p = (struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *)o;
  __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader(o);
  tmp = ((PyObject*)p->_object_to_pin);
  p->_object_to_pin = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._FlatArrayMessageReaderAligned", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_FlatArrayMessageReaderAligned()\n\n    Creates a reader based on a contiguous block of memory\n\n    For performance consideration it's assumed that the provided buffer is already aligned. This\n    allows us to align a set of adjacent messages with a single align operation.\n    ", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned, /*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_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatArrayMessageReader __pyx_vtable_5capnp_3lib_5capnp__FlatArrayMessageReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__FlatArrayMessageReader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageReader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader*)__pyx_vtabptr_5capnp_3lib_5capnp__FlatArrayMessageReader;
  p->_object_to_pin = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__FlatArrayMessageReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_object_to_pin);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__FlatArrayMessageReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)o;
  e = __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader(o, v, a); if (e) return e;
  if (p->_object_to_pin) {
    e = (*v)(p->_object_to_pin, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__FlatArrayMessageReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader *)o;
  __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader(o);
  tmp = ((PyObject*)p->_object_to_pin);
  p->_object_to_pin = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__FlatArrayMessageReader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_23_FlatArrayMessageReader_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_23_FlatArrayMessageReader_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_23_FlatArrayMessageReader_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._FlatArrayMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__FlatArrayMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_FlatArrayMessageReader(buf, traversal_limit_in_words=None, nesting_limit=None)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__FlatArrayMessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__FlatArrayMessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__FlatArrayMessageReader, /*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_5capnp_3lib_5capnp_23_FlatArrayMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__FlatArrayMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__SegmentArrayMessageReader __pyx_vtable_5capnp_3lib_5capnp__SegmentArrayMessageReader;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__SegmentArrayMessageReader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageReader(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageReader*)__pyx_vtabptr_5capnp_3lib_5capnp__SegmentArrayMessageReader;
  p->_objects_to_pin = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__SegmentArrayMessageReader(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_objects_to_pin);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageReader(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__SegmentArrayMessageReader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *)o;
  e = __pyx_tp_traverse_5capnp_3lib_5capnp__MessageReader(o, v, a); if (e) return e;
  if (p->_objects_to_pin) {
    e = (*v)(p->_objects_to_pin, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__SegmentArrayMessageReader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *p = (struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader *)o;
  __pyx_tp_clear_5capnp_3lib_5capnp__MessageReader(o);
  tmp = ((PyObject*)p->_objects_to_pin);
  p->_objects_to_pin = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__SegmentArrayMessageReader[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._SegmentArrayMessageReader", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__SegmentArrayMessageReader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__SegmentArrayMessageReader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_SegmentArrayMessageReader(segments, traversal_limit_in_words=None, nesting_limit=None)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__SegmentArrayMessageReader, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__SegmentArrayMessageReader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__SegmentArrayMessageReader, /*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_5capnp_3lib_5capnp_26_SegmentArrayMessageReader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__SegmentArrayMessageReader, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};
static struct __pyx_vtabstruct_5capnp_3lib_5capnp__FlatMessageBuilder __pyx_vtable_5capnp_3lib_5capnp__FlatMessageBuilder;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp__FlatMessageBuilder(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *p;
  PyObject *o = __pyx_tp_new_5capnp_3lib_5capnp__MessageBuilder(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5capnp_3lib_5capnp__MessageBuilder*)__pyx_vtabptr_5capnp_3lib_5capnp__FlatMessageBuilder;
  p->_object_to_pin = Py_None; Py_INCREF(Py_None);
  p->view.obj = NULL;
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp__FlatMessageBuilder(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_object_to_pin);
  #if CYTHON_USE_TYPE_SLOTS
  if (PyType_IS_GC(Py_TYPE(o)->tp_base))
  #endif
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_5capnp_3lib_5capnp__MessageBuilder(o);
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp__FlatMessageBuilder(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *)o;
  e = ((likely(__pyx_ptype_5capnp_3lib_5capnp__MessageBuilder)) ? ((__pyx_ptype_5capnp_3lib_5capnp__MessageBuilder->tp_traverse) ? __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5capnp_3lib_5capnp__FlatMessageBuilder)); if (e) return e;
  if (p->_object_to_pin) {
    e = (*v)(p->_object_to_pin, a); if (e) return e;
  }
  if (p->view.obj) {
    e = (*v)(p->view.obj, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp__FlatMessageBuilder(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *p = (struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder *)o;
  if (likely(__pyx_ptype_5capnp_3lib_5capnp__MessageBuilder)) { if (__pyx_ptype_5capnp_3lib_5capnp__MessageBuilder->tp_clear) __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5capnp_3lib_5capnp__FlatMessageBuilder);
  tmp = ((PyObject*)p->_object_to_pin);
  p->_object_to_pin = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  Py_CLEAR(p->view.obj);
  return 0;
}

static PyMethodDef __pyx_methods_5capnp_3lib_5capnp__FlatMessageBuilder[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_5__reduce_cython__, METH_NOARGS, __pyx_doc_5capnp_3lib_5capnp_19_FlatMessageBuilder_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_19_FlatMessageBuilder_7__setstate_cython__, METH_O, __pyx_doc_5capnp_3lib_5capnp_19_FlatMessageBuilder_6__setstate_cython__},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp._FlatMessageBuilder", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp__FlatMessageBuilder), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp__FlatMessageBuilder, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "_FlatMessageBuilder(buf)", /*tp_doc*/
  __pyx_tp_traverse_5capnp_3lib_5capnp__FlatMessageBuilder, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp__FlatMessageBuilder, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5capnp_3lib_5capnp__FlatMessageBuilder, /*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_5capnp_3lib_5capnp_19_FlatMessageBuilder_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5capnp_3lib_5capnp__FlatMessageBuilder, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct___make_enum[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct___make_enum = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct___make_enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct___make_enum > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct___make_enum[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct___make_enum];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum));
    (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_5capnp_3lib_5capnp___pyx_scope_struct___make_enum(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_enums);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct___make_enum < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct___make_enum[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct___make_enum++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct___make_enum(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *)o;
  if (p->__pyx_v_enums) {
    e = (*v)(p->__pyx_v_enums, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp___pyx_scope_struct___make_enum(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum *)o;
  tmp = ((PyObject*)p->__pyx_v_enums);
  p->__pyx_v_enums = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct___make_enum = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct___make_enum", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct___make_enum), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct___make_enum, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct___make_enum, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp___pyx_scope_struct___make_enum, /*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_5capnp_3lib_5capnp___pyx_scope_struct___make_enum, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_key);
  Py_CLEAR(p->__pyx_v_value);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_key) {
    e = (*v)(p->__pyx_v_key, a); if (e) return e;
  }
  if (p->__pyx_v_value) {
    e = (*v)(p->__pyx_v_value, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_1_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_ret);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait *)o;
  if (p->__pyx_v_ret) {
    e = (*v)(p->__pyx_v_ret, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_2_a_wait", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_3_read[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_3_read = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_3_read(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_3_read > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_3_read[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_3_read];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_3_read(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_bufsize);
  Py_CLEAR(p->__pyx_v_read_buffer);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_3_read < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_3_read[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_3_read++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_3_read(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read *)o;
  if (p->__pyx_v_bufsize) {
    e = (*v)(p->__pyx_v_bufsize, a); if (e) return e;
  }
  if (p->__pyx_v_read_buffer) {
    e = (*v)(((PyObject *)p->__pyx_v_read_buffer), a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_3_read = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_3_read", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_3_read), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_3_read, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_3_read, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_3_read, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_4_read[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_4_read = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_4_read(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_4_read > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_4_read[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_4_read];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_4_read(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_bufsize);
  Py_CLEAR(p->__pyx_v_read_buffer);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_4_read < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_4_read[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_4_read++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_4_read(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read *)o;
  if (p->__pyx_v_bufsize) {
    e = (*v)(p->__pyx_v_bufsize, a); if (e) return e;
  }
  if (p->__pyx_v_read_buffer) {
    e = (*v)(((PyObject *)p->__pyx_v_read_buffer), a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_4_read = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_4_read", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_4_read), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_4_read, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_4_read, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_4_read, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_5_write[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_5_write = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_5_write(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_5_write > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_5_write[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_5_write];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_5_write(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_data);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_write_buffer);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_5_write < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_5_write[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_5_write++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_5_write(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write *)o;
  if (p->__pyx_v_data) {
    e = (*v)(p->__pyx_v_data, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_write_buffer) {
    e = (*v)(((PyObject *)p->__pyx_v_write_buffer), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_5_write = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_5_write", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_5_write), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_5_write, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_5_write, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_5_write, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_6_poll_forever", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_7___get__[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_7___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *p;
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_7___get__[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_7___get__];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *)o);
  new((void*)&(p->__pyx_v_fieldlist))  ::capnp::StructSchema::FieldList();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_7___get__(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *)o;
  __Pyx_call_destructor(p->__pyx_v_fieldlist);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_7___get__[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_7___get__++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_7___get__", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_7___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_7___get__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_7___get__, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_8_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_9___get__[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_9___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *p;
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_9___get__[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_9___get__];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *)o);
  new((void*)&(p->__pyx_v_fieldlist))  ::capnp::StructSchema::FieldSubset();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_9___get__(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *)o;
  __Pyx_call_destructor(p->__pyx_v_fieldlist);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_9___get__[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_9___get__++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_9___get__", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_9___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_9___get__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_9___get__, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_10_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_11___get__[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_11___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *p;
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_11___get__[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_11___get__];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *)o);
  new((void*)&(p->__pyx_v_fieldlist))  ::capnp::StructSchema::FieldSubset();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_11___get__(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *)o;
  __Pyx_call_destructor(p->__pyx_v_fieldlist);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_11___get__[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_11___get__++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_11___get__", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_11___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_11___get__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_11___get__, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_12_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_13___get__[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_13___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *p;
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_13___get__[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_13___get__];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *)o);
  new((void*)&(p->__pyx_v_fieldlist))  ::capnp::InterfaceSchema::MethodList();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_13___get__(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *)o;
  __Pyx_call_destructor(p->__pyx_v_fieldlist);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_13___get__[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_13___get__++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_13___get__", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_13___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_13___get__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_13___get__, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_14_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_15___get__[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_15___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *p;
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_15___get__[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_15___get__];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__));
    (void) PyObject_INIT(o, t);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  p = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *)o);
  new((void*)&(p->__pyx_v_fieldlist))  ::capnp::InterfaceSchema::MethodList();
  return o;
}

static void __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_15___get__(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *)o;
  __Pyx_call_destructor(p->__pyx_v_fieldlist);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_15___get__[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_15___get__++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_15___get__", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_15___get__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_15___get__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_15___get__, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_16_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr, /*tp_traverse*/
  0, /*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_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_17_load[8];
static int __pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_17_load = 0;

static PyObject *__pyx_tp_new_5capnp_3lib_5capnp___pyx_scope_struct_17_load(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_17_load > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load)))) {
    o = (PyObject*)__pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_17_load[--__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_17_load];
    memset(o, 0, sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load));
    (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_5capnp_3lib_5capnp___pyx_scope_struct_17_load(PyObject *o) {
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v__load);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_17_load < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load)))) {
    __pyx_freelist_5capnp_3lib_5capnp___pyx_scope_struct_17_load[__pyx_freecount_5capnp_3lib_5capnp___pyx_scope_struct_17_load++] = ((struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5capnp_3lib_5capnp___pyx_scope_struct_17_load(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *)o;
  if (p->__pyx_v__load) {
    e = (*v)(p->__pyx_v__load, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5capnp_3lib_5capnp___pyx_scope_struct_17_load(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *p = (struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load *)o;
  tmp = ((PyObject*)p->__pyx_v__load);
  p->__pyx_v__load = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_17_load = {
  PyVarObject_HEAD_INIT(0, 0)
  "capnp.lib.capnp.__pyx_scope_struct_17_load", /*tp_name*/
  sizeof(struct __pyx_obj_5capnp_3lib_5capnp___pyx_scope_struct_17_load), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5capnp_3lib_5capnp___pyx_scope_struct_17_load, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  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_5capnp_3lib_5capnp___pyx_scope_struct_17_load, /*tp_traverse*/
  __pyx_tp_clear_5capnp_3lib_5capnp___pyx_scope_struct_17_load, /*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_5capnp_3lib_5capnp___pyx_scope_struct_17_load, /*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
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {"remove_event_loop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_11remove_event_loop, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_10remove_event_loop},
  {"create_event_loop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_13create_event_loop, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_12create_event_loop},
  {"reset_event_loop", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5capnp_3lib_5capnp_15reset_event_loop, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5capnp_3lib_5capnp_14reset_event_loop},
  {"join_promises", (PyCFunction)__pyx_pw_5capnp_3lib_5capnp_21join_promises, METH_O, __pyx_doc_5capnp_3lib_5capnp_20join_promises},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_capnp(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_capnp},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "capnp",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_AF_UNIX, __pyx_k_AF_UNIX, sizeof(__pyx_k_AF_UNIX), 0, 0, 1, 1},
  {&__pyx_kp_s_A_metaclass_for_the_Type_Reader, __pyx_k_A_metaclass_for_the_Type_Reader, sizeof(__pyx_k_A_metaclass_for_the_Type_Reader), 0, 0, 1, 0},
  {&__pyx_kp_s_An_abstract_base_class_Builders, __pyx_k_An_abstract_base_class_Builders, sizeof(__pyx_k_An_abstract_base_class_Builders), 0, 0, 1, 0},
  {&__pyx_kp_s_An_abstract_base_class_Readers_a, __pyx_k_An_abstract_base_class_Readers_a, sizeof(__pyx_k_An_abstract_base_class_Readers_a), 0, 0, 1, 0},
  {&__pyx_n_s_AnyPointer, __pyx_k_AnyPointer, sizeof(__pyx_k_AnyPointer), 0, 0, 1, 1},
  {&__pyx_n_s_AsyncIoStream, __pyx_k_AsyncIoStream, sizeof(__pyx_k_AsyncIoStream), 0, 0, 1, 1},
  {&__pyx_kp_s_Attempted_to_call_which_on_a_non, __pyx_k_Attempted_to_call_which_on_a_non, sizeof(__pyx_k_Attempted_to_call_which_on_a_non), 0, 0, 1, 0},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_Bool, __pyx_k_Bool, sizeof(__pyx_k_Bool), 0, 0, 1, 1},
  {&__pyx_n_s_Builder, __pyx_k_Builder, sizeof(__pyx_k_Builder), 0, 0, 1, 1},
  {&__pyx_n_s_CAPNP_VERSION, __pyx_k_CAPNP_VERSION, sizeof(__pyx_k_CAPNP_VERSION), 0, 0, 1, 1},
  {&__pyx_n_s_CAPNP_VERSION_MAJOR, __pyx_k_CAPNP_VERSION_MAJOR, sizeof(__pyx_k_CAPNP_VERSION_MAJOR), 0, 0, 1, 1},
  {&__pyx_n_s_CAPNP_VERSION_MICRO, __pyx_k_CAPNP_VERSION_MICRO, sizeof(__pyx_k_CAPNP_VERSION_MICRO), 0, 0, 1, 1},
  {&__pyx_n_s_CAPNP_VERSION_MINOR, __pyx_k_CAPNP_VERSION_MINOR, sizeof(__pyx_k_CAPNP_VERSION_MINOR), 0, 0, 1, 1},
  {&__pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL, __pyx_k_C_DEFAULT_EVENT_LOOP_LOCAL, sizeof(__pyx_k_C_DEFAULT_EVENT_LOOP_LOCAL), 0, 0, 1, 1},
  {&__pyx_n_s_CallContext, __pyx_k_CallContext, sizeof(__pyx_k_CallContext), 0, 0, 1, 1},
  {&__pyx_kp_s_Cannot_call_method_s_with_positi, __pyx_k_Cannot_call_method_s_with_positi, sizeof(__pyx_k_Cannot_call_method_s_with_positi), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_convert_type_to_Python_Ty, __pyx_k_Cannot_convert_type_to_Python_Ty, sizeof(__pyx_k_Cannot_convert_type_to_Python_Ty), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_convert_type_to_Python_Ty_2, __pyx_k_Cannot_convert_type_to_Python_Ty_2, sizeof(__pyx_k_Cannot_convert_type_to_Python_Ty_2), 0, 0, 1, 0},
  {&__pyx_n_s_CapabilityClient, __pyx_k_CapabilityClient, sizeof(__pyx_k_CapabilityClient), 0, 0, 1, 1},
  {&__pyx_kp_b_Couldn_t_determine_python_except, __pyx_k_Couldn_t_determine_python_except, sizeof(__pyx_k_Couldn_t_determine_python_except), 0, 0, 0, 0},
  {&__pyx_n_s_DISCONNECTED, __pyx_k_DISCONNECTED, sizeof(__pyx_k_DISCONNECTED), 0, 0, 1, 1},
  {&__pyx_n_s_Data, __pyx_k_Data, sizeof(__pyx_k_Data), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicCapabilityClient, __pyx_k_DynamicCapabilityClient, sizeof(__pyx_k_DynamicCapabilityClient), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicCapabilityServer, __pyx_k_DynamicCapabilityServer, sizeof(__pyx_k_DynamicCapabilityServer), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicEnum, __pyx_k_DynamicEnum, sizeof(__pyx_k_DynamicEnum), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicEnumField, __pyx_k_DynamicEnumField, sizeof(__pyx_k_DynamicEnumField), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicListBuilder, __pyx_k_DynamicListBuilder, sizeof(__pyx_k_DynamicListBuilder), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicListReader, __pyx_k_DynamicListReader, sizeof(__pyx_k_DynamicListReader), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicObjectBuilder, __pyx_k_DynamicObjectBuilder, sizeof(__pyx_k_DynamicObjectBuilder), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicObjectReader, __pyx_k_DynamicObjectReader, sizeof(__pyx_k_DynamicObjectReader), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicOrphan, __pyx_k_DynamicOrphan, sizeof(__pyx_k_DynamicOrphan), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicResizableListBuilder, __pyx_k_DynamicResizableListBuilder, sizeof(__pyx_k_DynamicResizableListBuilder), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicStructBuilder, __pyx_k_DynamicStructBuilder, sizeof(__pyx_k_DynamicStructBuilder), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicStructPipeline, __pyx_k_DynamicStructPipeline, sizeof(__pyx_k_DynamicStructPipeline), 0, 0, 1, 1},
  {&__pyx_n_s_DynamicStructReader, __pyx_k_DynamicStructReader, sizeof(__pyx_k_DynamicStructReader), 0, 0, 1, 1},
  {&__pyx_n_s_EOF, __pyx_k_EOF, sizeof(__pyx_k_EOF), 0, 0, 1, 1},
  {&__pyx_n_s_EnumModule, __pyx_k_EnumModule, sizeof(__pyx_k_EnumModule), 0, 0, 1, 1},
  {&__pyx_n_s_EnumModule___init, __pyx_k_EnumModule___init, sizeof(__pyx_k_EnumModule___init), 0, 0, 1, 1},
  {&__pyx_n_s_EnumSchema, __pyx_k_EnumSchema, sizeof(__pyx_k_EnumSchema), 0, 0, 1, 1},
  {&__pyx_n_s_EventLoop, __pyx_k_EventLoop, sizeof(__pyx_k_EventLoop), 0, 0, 1, 1},
  {&__pyx_n_s_FAILED, __pyx_k_FAILED, sizeof(__pyx_k_FAILED), 0, 0, 1, 1},
  {&__pyx_n_s_FdAsyncIoStream, __pyx_k_FdAsyncIoStream, sizeof(__pyx_k_FdAsyncIoStream), 0, 0, 1, 1},
  {&__pyx_kp_s_File_does_not_end_with_capnp, __pyx_k_File_does_not_end_with_capnp, sizeof(__pyx_k_File_does_not_end_with_capnp), 0, 0, 1, 0},
  {&__pyx_kp_s_File_not_found, __pyx_k_File_not_found, sizeof(__pyx_k_File_not_found), 0, 0, 1, 0},
  {&__pyx_n_s_Float32, __pyx_k_Float32, sizeof(__pyx_k_Float32), 0, 0, 1, 1},
  {&__pyx_n_s_Float64, __pyx_k_Float64, sizeof(__pyx_k_Float64), 0, 0, 1, 1},
  {&__pyx_kp_s_Function_passed_to_then_call_mus, __pyx_k_Function_passed_to_then_call_mus, sizeof(__pyx_k_Function_passed_to_then_call_mus), 0, 0, 1, 0},
  {&__pyx_kp_s_Function_passed_to_then_call_mus_2, __pyx_k_Function_passed_to_then_call_mus_2, sizeof(__pyx_k_Function_passed_to_then_call_mus_2), 0, 0, 1, 0},
  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
  {&__pyx_n_s_IPPROTO_TCP, __pyx_k_IPPROTO_TCP, sizeof(__pyx_k_IPPROTO_TCP), 0, 0, 1, 1},
  {&__pyx_n_s_Importer, __pyx_k_Importer, sizeof(__pyx_k_Importer), 0, 0, 1, 1},
  {&__pyx_n_s_Importer___init, __pyx_k_Importer___init, sizeof(__pyx_k_Importer___init), 0, 0, 1, 1},
  {&__pyx_n_s_Importer_find_module, __pyx_k_Importer_find_module, sizeof(__pyx_k_Importer_find_module), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x49, __pyx_k_Incompatible_checksums_s_vs_0x49, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x49), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0x54, __pyx_k_Incompatible_checksums_s_vs_0x54, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x54), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xae, __pyx_k_Incompatible_checksums_s_vs_0xae, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xae), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd1, __pyx_k_Incompatible_checksums_s_vs_0xd1, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd1), 0, 0, 1, 0},
  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd6, __pyx_k_Incompatible_checksums_s_vs_0xd6, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd6), 0, 0, 1, 0},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_n_s_InputMessageReader, __pyx_k_InputMessageReader, sizeof(__pyx_k_InputMessageReader), 0, 0, 1, 1},
  {&__pyx_n_s_Int16, __pyx_k_Int16, sizeof(__pyx_k_Int16), 0, 0, 1, 1},
  {&__pyx_n_s_Int32, __pyx_k_Int32, sizeof(__pyx_k_Int32), 0, 0, 1, 1},
  {&__pyx_n_s_Int64, __pyx_k_Int64, sizeof(__pyx_k_Int64), 0, 0, 1, 1},
  {&__pyx_n_s_Int8, __pyx_k_Int8, sizeof(__pyx_k_Int8), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceMethod, __pyx_k_InterfaceMethod, sizeof(__pyx_k_InterfaceMethod), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceModule, __pyx_k_InterfaceModule, sizeof(__pyx_k_InterfaceModule), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceModule___init, __pyx_k_InterfaceModule___init, sizeof(__pyx_k_InterfaceModule___init), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceModule___init___locals, __pyx_k_InterfaceModule___init___locals, sizeof(__pyx_k_InterfaceModule___init___locals), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceModule__new_client, __pyx_k_InterfaceModule__new_client, sizeof(__pyx_k_InterfaceModule__new_client), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceModule__new_server, __pyx_k_InterfaceModule__new_server, sizeof(__pyx_k_InterfaceModule__new_server), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceSchema, __pyx_k_InterfaceSchema, sizeof(__pyx_k_InterfaceSchema), 0, 0, 1, 1},
  {&__pyx_n_s_InterfaceSchema___get___locals, __pyx_k_InterfaceSchema___get___locals, sizeof(__pyx_k_InterfaceSchema___get___locals), 0, 0, 1, 1},
  {&__pyx_kp_s_Invalid_buffer_passed_to_BufferV, __pyx_k_Invalid_buffer_passed_to_BufferV, sizeof(__pyx_k_Invalid_buffer_passed_to_BufferV), 0, 0, 1, 0},
  {&__pyx_n_s_KjException, __pyx_k_KjException, sizeof(__pyx_k_KjException), 0, 0, 1, 1},
  {&__pyx_n_s_KjExceptionWrapper, __pyx_k_KjExceptionWrapper, sizeof(__pyx_k_KjExceptionWrapper), 0, 0, 1, 1},
  {&__pyx_n_s_KjException___init, __pyx_k_KjException___init, sizeof(__pyx_k_KjException___init), 0, 0, 1, 1},
  {&__pyx_n_s_KjException___str, __pyx_k_KjException___str, sizeof(__pyx_k_KjException___str), 0, 0, 1, 1},
  {&__pyx_n_s_KjException__to_python, __pyx_k_KjException__to_python, sizeof(__pyx_k_KjException__to_python), 0, 0, 1, 1},
  {&__pyx_n_s_KjException_description, __pyx_k_KjException_description, sizeof(__pyx_k_KjException_description), 0, 0, 1, 1},
  {&__pyx_n_s_KjException_file, __pyx_k_KjException_file, sizeof(__pyx_k_KjException_file), 0, 0, 1, 1},
  {&__pyx_kp_s_KjException_is_a_wrapper_of_the, __pyx_k_KjException_is_a_wrapper_of_the, sizeof(__pyx_k_KjException_is_a_wrapper_of_the), 0, 0, 1, 0},
  {&__pyx_n_s_KjException_line, __pyx_k_KjException_line, sizeof(__pyx_k_KjException_line), 0, 0, 1, 1},
  {&__pyx_n_s_KjException_type, __pyx_k_KjException_type, sizeof(__pyx_k_KjException_type), 0, 0, 1, 1},
  {&__pyx_n_s_ListSchema, __pyx_k_ListSchema, sizeof(__pyx_k_ListSchema), 0, 0, 1, 1},
  {&__pyx_n_s_List_NestedNode_Reader, __pyx_k_List_NestedNode_Reader, sizeof(__pyx_k_List_NestedNode_Reader), 0, 0, 1, 1},
  {&__pyx_n_s_Loader, __pyx_k_Loader, sizeof(__pyx_k_Loader), 0, 0, 1, 1},
  {&__pyx_n_s_Loader___init, __pyx_k_Loader___init, sizeof(__pyx_k_Loader___init), 0, 0, 1, 1},
  {&__pyx_n_s_Loader_load_module, __pyx_k_Loader_load_module, sizeof(__pyx_k_Loader_load_module), 0, 0, 1, 1},
  {&__pyx_n_s_MallocMessageBuilder, __pyx_k_MallocMessageBuilder, sizeof(__pyx_k_MallocMessageBuilder), 0, 0, 1, 1},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_n_s_MessageBuilder, __pyx_k_MessageBuilder, sizeof(__pyx_k_MessageBuilder), 0, 0, 1, 1},
  {&__pyx_n_s_MessageReader, __pyx_k_MessageReader, sizeof(__pyx_k_MessageReader), 0, 0, 1, 1},
  {&__pyx_n_s_MessageSize, __pyx_k_MessageSize, sizeof(__pyx_k_MessageSize), 0, 0, 1, 1},
  {&__pyx_kp_s_Method_named_s_not_found, __pyx_k_Method_named_s_not_found, sizeof(__pyx_k_Method_named_s_not_found), 0, 0, 1, 0},
  {&__pyx_kp_s_Method_named_s_not_found_2, __pyx_k_Method_named_s_not_found_2, sizeof(__pyx_k_Method_named_s_not_found_2), 0, 0, 1, 0},
  {&__pyx_n_s_ModuleType, __pyx_k_ModuleType, sizeof(__pyx_k_ModuleType), 0, 0, 1, 1},
  {&__pyx_n_s_ModuleType_2, __pyx_k_ModuleType_2, sizeof(__pyx_k_ModuleType_2), 0, 0, 1, 1},
  {&__pyx_n_s_MultipleBytesMessageReader, __pyx_k_MultipleBytesMessageReader, sizeof(__pyx_k_MultipleBytesMessageReader), 0, 0, 1, 1},
  {&__pyx_n_s_MultipleBytesPackedMessageReade, __pyx_k_MultipleBytesPackedMessageReade, sizeof(__pyx_k_MultipleBytesPackedMessageReade), 0, 0, 1, 1},
  {&__pyx_n_s_MultipleMessageReader, __pyx_k_MultipleMessageReader, sizeof(__pyx_k_MultipleMessageReader), 0, 0, 1, 1},
  {&__pyx_n_s_MultiplePackedMessageReader, __pyx_k_MultiplePackedMessageReader, sizeof(__pyx_k_MultiplePackedMessageReader), 0, 0, 1, 1},
  {&__pyx_n_s_NestedNodeReader, __pyx_k_NestedNodeReader, sizeof(__pyx_k_NestedNodeReader), 0, 0, 1, 1},
  {&__pyx_n_s_NodeReader, __pyx_k_NodeReader, sizeof(__pyx_k_NodeReader), 0, 0, 1, 1},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_s_OTHER, __pyx_k_OTHER, sizeof(__pyx_k_OTHER), 0, 0, 1, 1},
  {&__pyx_n_s_OVERLOADED, __pyx_k_OVERLOADED, sizeof(__pyx_k_OVERLOADED), 0, 0, 1, 1},
  {&__pyx_kp_s_One_of_the_promises_passed_to_jo, __pyx_k_One_of_the_promises_passed_to_jo, sizeof(__pyx_k_One_of_the_promises_passed_to_jo), 0, 0, 1, 0},
  {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
  {&__pyx_kp_s_Out_of_bounds, __pyx_k_Out_of_bounds, sizeof(__pyx_k_Out_of_bounds), 0, 0, 1, 0},
  {&__pyx_n_s_PackedFdMessageReader, __pyx_k_PackedFdMessageReader, sizeof(__pyx_k_PackedFdMessageReader), 0, 0, 1, 1},
  {&__pyx_n_s_PackedMessageReader, __pyx_k_PackedMessageReader, sizeof(__pyx_k_PackedMessageReader), 0, 0, 1, 1},
  {&__pyx_n_s_PackedMessageReaderBytes, __pyx_k_PackedMessageReaderBytes, sizeof(__pyx_k_PackedMessageReaderBytes), 0, 0, 1, 1},
  {&__pyx_n_s_ParsedSchema, __pyx_k_ParsedSchema, sizeof(__pyx_k_ParsedSchema), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_Promise, __pyx_k_Promise, sizeof(__pyx_k_Promise), 0, 0, 1, 1},
  {&__pyx_n_s_PromiseFulfillerPair, __pyx_k_PromiseFulfillerPair, sizeof(__pyx_k_PromiseFulfillerPair), 0, 0, 1, 1},
  {&__pyx_kp_s_Promise_was_already_used_in_a_co, __pyx_k_Promise_was_already_used_in_a_co, sizeof(__pyx_k_Promise_was_already_used_in_a_co), 0, 0, 1, 0},
  {&__pyx_n_s_PyAsyncIoStream, __pyx_k_PyAsyncIoStream, sizeof(__pyx_k_PyAsyncIoStream), 0, 0, 1, 1},
  {&__pyx_n_s_PyPy, __pyx_k_PyPy, sizeof(__pyx_k_PyPy), 0, 0, 1, 1},
  {&__pyx_n_s_Reader, __pyx_k_Reader, sizeof(__pyx_k_Reader), 0, 0, 1, 1},
  {&__pyx_n_s_RemotePromise, __pyx_k_RemotePromise, sizeof(__pyx_k_RemotePromise), 0, 0, 1, 1},
  {&__pyx_n_s_RemotePromise_a_wait, __pyx_k_RemotePromise_a_wait, sizeof(__pyx_k_RemotePromise_a_wait), 0, 0, 1, 1},
  {&__pyx_n_s_Request, __pyx_k_Request, sizeof(__pyx_k_Request), 0, 0, 1, 1},
  {&__pyx_kp_s_Request_has_already_been_sent_Yo, __pyx_k_Request_has_already_been_sent_Yo, sizeof(__pyx_k_Request_has_already_been_sent_Yo), 0, 0, 1, 0},
  {&__pyx_n_s_Response, __pyx_k_Response, sizeof(__pyx_k_Response), 0, 0, 1, 1},
  {&__pyx_n_s_SOCK_STREAM, __pyx_k_SOCK_STREAM, sizeof(__pyx_k_SOCK_STREAM), 0, 0, 1, 1},
  {&__pyx_n_s_Schema, __pyx_k_Schema, sizeof(__pyx_k_Schema), 0, 0, 1, 1},
  {&__pyx_n_s_SchemaParser, __pyx_k_SchemaParser, sizeof(__pyx_k_SchemaParser), 0, 0, 1, 1},
  {&__pyx_n_s_SchemaType, __pyx_k_SchemaType, sizeof(__pyx_k_SchemaType), 0, 0, 1, 1},
  {&__pyx_kp_s_Schema_type_is_unknown, __pyx_k_Schema_type_is_unknown, sizeof(__pyx_k_Schema_type_is_unknown), 0, 0, 1, 0},
  {&__pyx_kp_s_Server, __pyx_k_Server, sizeof(__pyx_k_Server), 0, 0, 1, 0},
  {&__pyx_n_s_Server_2, __pyx_k_Server_2, sizeof(__pyx_k_Server_2), 0, 0, 1, 1},
  {&__pyx_kp_s_Server_function_s_returned_a_val, __pyx_k_Server_function_s_returned_a_val, sizeof(__pyx_k_Server_function_s_returned_a_val), 0, 0, 1, 0},
  {&__pyx_kp_s_Server_function_s_returned_a_val_2, __pyx_k_Server_function_s_returned_a_val_2, sizeof(__pyx_k_Server_function_s_returned_a_val_2), 0, 0, 1, 0},
  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
  {&__pyx_n_s_StreamFdMessageReader, __pyx_k_StreamFdMessageReader, sizeof(__pyx_k_StreamFdMessageReader), 0, 0, 1, 1},
  {&__pyx_n_s_StringArrayPtr, __pyx_k_StringArrayPtr, sizeof(__pyx_k_StringArrayPtr), 0, 0, 1, 1},
  {&__pyx_n_s_StructABCMeta, __pyx_k_StructABCMeta, sizeof(__pyx_k_StructABCMeta), 0, 0, 1, 1},
  {&__pyx_n_s_StructABCMeta___instancecheck, __pyx_k_StructABCMeta___instancecheck, sizeof(__pyx_k_StructABCMeta___instancecheck), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule, __pyx_k_StructModule, sizeof(__pyx_k_StructModule), 0, 0, 1, 1},
  {&__pyx_n_s_StructModuleWhich, __pyx_k_StructModuleWhich, sizeof(__pyx_k_StructModuleWhich), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule___call, __pyx_k_StructModule___call, sizeof(__pyx_k_StructModule___call), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule___init, __pyx_k_StructModule___init, sizeof(__pyx_k_StructModule___init), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_from_bytes, __pyx_k_StructModule_from_bytes, sizeof(__pyx_k_StructModule_from_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_from_bytes_packed, __pyx_k_StructModule_from_bytes_packed, sizeof(__pyx_k_StructModule_from_bytes_packed), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_from_segments, __pyx_k_StructModule_from_segments, sizeof(__pyx_k_StructModule_from_segments), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_new_message, __pyx_k_StructModule_new_message, sizeof(__pyx_k_StructModule_new_message), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_read, __pyx_k_StructModule_read, sizeof(__pyx_k_StructModule_read), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_read_multiple, __pyx_k_StructModule_read_multiple, sizeof(__pyx_k_StructModule_read_multiple), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_read_multiple_byte, __pyx_k_StructModule_read_multiple_byte, sizeof(__pyx_k_StructModule_read_multiple_byte), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_read_multiple_byte_2, __pyx_k_StructModule_read_multiple_byte_2, sizeof(__pyx_k_StructModule_read_multiple_byte_2), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_read_multiple_pack, __pyx_k_StructModule_read_multiple_pack, sizeof(__pyx_k_StructModule_read_multiple_pack), 0, 0, 1, 1},
  {&__pyx_n_s_StructModule_read_packed, __pyx_k_StructModule_read_packed, sizeof(__pyx_k_StructModule_read_packed), 0, 0, 1, 1},
  {&__pyx_n_s_StructSchema, __pyx_k_StructSchema, sizeof(__pyx_k_StructSchema), 0, 0, 1, 1},
  {&__pyx_n_s_StructSchemaField, __pyx_k_StructSchemaField, sizeof(__pyx_k_StructSchemaField), 0, 0, 1, 1},
  {&__pyx_n_s_StructSchema___get___locals_gen, __pyx_k_StructSchema___get___locals_gen, sizeof(__pyx_k_StructSchema___get___locals_gen), 0, 0, 1, 1},
  {&__pyx_n_s_TCP_NODELAY, __pyx_k_TCP_NODELAY, sizeof(__pyx_k_TCP_NODELAY), 0, 0, 1, 1},
  {&__pyx_n_s_THREAD_LOCAL_EVENT_LOOPS, __pyx_k_THREAD_LOCAL_EVENT_LOOPS, sizeof(__pyx_k_THREAD_LOCAL_EVENT_LOOPS), 0, 0, 1, 1},
  {&__pyx_n_s_Text, __pyx_k_Text, sizeof(__pyx_k_Text), 0, 0, 1, 1},
  {&__pyx_kp_s_This_is_an_abstract_base_class, __pyx_k_This_is_an_abstract_base_class, sizeof(__pyx_k_This_is_an_abstract_base_class), 0, 0, 1, 0},
  {&__pyx_kp_s_This_is_an_abstract_base_class_Y, __pyx_k_This_is_an_abstract_base_class_Y, sizeof(__pyx_k_This_is_an_abstract_base_class_Y), 0, 0, 1, 0},
  {&__pyx_kp_s_This_message_has_already_been_wr, __pyx_k_This_message_has_already_been_wr, sizeof(__pyx_k_This_message_has_already_been_wr), 0, 0, 1, 0},
  {&__pyx_n_s_Timer, __pyx_k_Timer, sizeof(__pyx_k_Timer), 0, 0, 1, 1},
  {&__pyx_kp_s_Too_many_arguments_passed_to_s_E, __pyx_k_Too_many_arguments_passed_to_s_E, sizeof(__pyx_k_Too_many_arguments_passed_to_s_E), 0, 0, 1, 0},
  {&__pyx_kp_s_Too_many_values_returned_from_s, __pyx_k_Too_many_values_returned_from_s, sizeof(__pyx_k_Too_many_values_returned_from_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Tried_to_set_field_with_a_value, __pyx_k_Tried_to_set_field_with_a_value, sizeof(__pyx_k_Tried_to_set_field_with_a_value), 0, 0, 1, 0},
  {&__pyx_n_s_TwoPartyClient, __pyx_k_TwoPartyClient, sizeof(__pyx_k_TwoPartyClient), 0, 0, 1, 1},
  {&__pyx_n_s_TwoPartyClient_read, __pyx_k_TwoPartyClient_read, sizeof(__pyx_k_TwoPartyClient_read), 0, 0, 1, 1},
  {&__pyx_n_s_TwoPartyServer, __pyx_k_TwoPartyServer, sizeof(__pyx_k_TwoPartyServer), 0, 0, 1, 1},
  {&__pyx_n_s_TwoPartyServer_poll_forever, __pyx_k_TwoPartyServer_poll_forever, sizeof(__pyx_k_TwoPartyServer_poll_forever), 0, 0, 1, 1},
  {&__pyx_n_s_TwoPartyServer_read, __pyx_k_TwoPartyServer_read, sizeof(__pyx_k_TwoPartyServer_read), 0, 0, 1, 1},
  {&__pyx_n_s_TwoPartyServer_write, __pyx_k_TwoPartyServer_write, sizeof(__pyx_k_TwoPartyServer_write), 0, 0, 1, 1},
  {&__pyx_n_s_TwoPartyVatNetwork, __pyx_k_TwoPartyVatNetwork, sizeof(__pyx_k_TwoPartyVatNetwork), 0, 0, 1, 1},
  {&__pyx_n_s_TwoWayPipe, __pyx_k_TwoWayPipe, sizeof(__pyx_k_TwoWayPipe), 0, 0, 1, 1},
  {&__pyx_n_s_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_Type_2, __pyx_k_Type_2, sizeof(__pyx_k_Type_2), 0, 0, 1, 1},
  {&__pyx_n_s_UInt16, __pyx_k_UInt16, sizeof(__pyx_k_UInt16), 0, 0, 1, 1},
  {&__pyx_n_s_UInt32, __pyx_k_UInt32, sizeof(__pyx_k_UInt32), 0, 0, 1, 1},
  {&__pyx_n_s_UInt64, __pyx_k_UInt64, sizeof(__pyx_k_UInt64), 0, 0, 1, 1},
  {&__pyx_n_s_UInt8, __pyx_k_UInt8, sizeof(__pyx_k_UInt8), 0, 0, 1, 1},
  {&__pyx_n_s_UNIMPLEMENTED, __pyx_k_UNIMPLEMENTED, sizeof(__pyx_k_UNIMPLEMENTED), 0, 0, 1, 1},
  {&__pyx_kp_s_Unknown_schema_type, __pyx_k_Unknown_schema_type, sizeof(__pyx_k_Unknown_schema_type), 0, 0, 1, 0},
  {&__pyx_n_s_UserWarning, __pyx_k_UserWarning, sizeof(__pyx_k_UserWarning), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_Void, __pyx_k_Void, sizeof(__pyx_k_Void), 0, 0, 1, 1},
  {&__pyx_n_s_VoidPromise, __pyx_k_VoidPromise, sizeof(__pyx_k_VoidPromise), 0, 0, 1, 1},
  {&__pyx_kp_s_You_can_only_call_write_on_the_m, __pyx_k_You_can_only_call_write_on_the_m, sizeof(__pyx_k_You_can_only_call_write_on_the_m), 0, 0, 1, 0},
  {&__pyx_kp_s_You_must_pass_a_string_as_the_so, __pyx_k_You_must_pass_a_string_as_the_so, sizeof(__pyx_k_You_must_pass_a_string_as_the_so), 0, 0, 1, 0},
  {&__pyx_kp_s_You_must_provide_a_bootstrap_int, __pyx_k_You_must_provide_a_bootstrap_int, sizeof(__pyx_k_You_must_provide_a_bootstrap_int), 0, 0, 1, 0},
  {&__pyx_kp_s__133, __pyx_k__133, sizeof(__pyx_k__133), 0, 0, 1, 0},
  {&__pyx_n_s__134, __pyx_k__134, sizeof(__pyx_k__134), 0, 0, 1, 1},
  {&__pyx_kp_s__135, __pyx_k__135, sizeof(__pyx_k__135), 0, 0, 1, 0},
  {&__pyx_kp_s__137, __pyx_k__137, sizeof(__pyx_k__137), 0, 0, 1, 0},
  {&__pyx_kp_s__140, __pyx_k__140, sizeof(__pyx_k__140), 0, 0, 1, 0},
  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {&__pyx_kp_b__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 0, 0},
  {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
  {&__pyx_n_s_a_wait, __pyx_k_a_wait, sizeof(__pyx_k_a_wait), 0, 0, 1, 1},
  {&__pyx_n_s_abspath, __pyx_k_abspath, sizeof(__pyx_k_abspath), 0, 0, 1, 1},
  {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
  {&__pyx_n_s_add_import_hook, __pyx_k_add_import_hook, sizeof(__pyx_k_add_import_hook), 0, 0, 1, 1},
  {&__pyx_n_s_additional_paths, __pyx_k_additional_paths, sizeof(__pyx_k_additional_paths), 0, 0, 1, 1},
  {&__pyx_n_s_adopt, __pyx_k_adopt, sizeof(__pyx_k_adopt), 0, 0, 1, 1},
  {&__pyx_n_s_after_delay, __pyx_k_after_delay, sizeof(__pyx_k_after_delay), 0, 0, 1, 1},
  {&__pyx_n_s_allow_cancellation, __pyx_k_allow_cancellation, sizeof(__pyx_k_allow_cancellation), 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_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_as_builder, __pyx_k_as_builder, sizeof(__pyx_k_as_builder), 0, 0, 1, 1},
  {&__pyx_n_s_as_const_value, __pyx_k_as_const_value, sizeof(__pyx_k_as_const_value), 0, 0, 1, 1},
  {&__pyx_n_s_as_enum, __pyx_k_as_enum, sizeof(__pyx_k_as_enum), 0, 0, 1, 1},
  {&__pyx_n_s_as_interface, __pyx_k_as_interface, sizeof(__pyx_k_as_interface), 0, 0, 1, 1},
  {&__pyx_n_s_as_list, __pyx_k_as_list, sizeof(__pyx_k_as_list), 0, 0, 1, 1},
  {&__pyx_n_s_as_pypromise, __pyx_k_as_pypromise, sizeof(__pyx_k_as_pypromise), 0, 0, 1, 1},
  {&__pyx_n_s_as_reader, __pyx_k_as_reader, sizeof(__pyx_k_as_reader), 0, 0, 1, 1},
  {&__pyx_n_s_as_str, __pyx_k_as_str, sizeof(__pyx_k_as_str), 0, 0, 1, 1},
  {&__pyx_n_s_as_struct, __pyx_k_as_struct, sizeof(__pyx_k_as_struct), 0, 0, 1, 1},
  {&__pyx_n_s_as_text, __pyx_k_as_text, sizeof(__pyx_k_as_text), 0, 0, 1, 1},
  {&__pyx_n_s_asyncio, __pyx_k_asyncio, sizeof(__pyx_k_asyncio), 0, 0, 1, 1},
  {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
  {&__pyx_n_s_asyncio_tasks, __pyx_k_asyncio_tasks, sizeof(__pyx_k_asyncio_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_attrgetter, __pyx_k_attrgetter, sizeof(__pyx_k_attrgetter), 0, 0, 1, 1},
  {&__pyx_n_s_attrgetter_2, __pyx_k_attrgetter_2, sizeof(__pyx_k_attrgetter_2), 0, 0, 1, 1},
  {&__pyx_n_s_await, __pyx_k_await, sizeof(__pyx_k_await), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_kp_s_backing_array_was_not_large_enou, __pyx_k_backing_array_was_not_large_enou, sizeof(__pyx_k_backing_array_was_not_large_enou), 0, 0, 1, 0},
  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
  {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1},
  {&__pyx_n_s_bootstrap, __pyx_k_bootstrap, sizeof(__pyx_k_bootstrap), 0, 0, 1, 1},
  {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1},
  {&__pyx_n_s_builder, __pyx_k_builder, sizeof(__pyx_k_builder), 0, 0, 1, 1},
  {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
  {&__pyx_n_s_cancel, __pyx_k_cancel, sizeof(__pyx_k_cancel), 0, 0, 1, 1},
  {&__pyx_n_s_cap_count, __pyx_k_cap_count, sizeof(__pyx_k_cap_count), 0, 0, 1, 1},
  {&__pyx_kp_s_capnp, __pyx_k_capnp, sizeof(__pyx_k_capnp), 0, 0, 1, 0},
  {&__pyx_n_s_capnp_2, __pyx_k_capnp_2, sizeof(__pyx_k_capnp_2), 0, 0, 1, 1},
  {&__pyx_n_s_capnp_lib_capnp, __pyx_k_capnp_lib_capnp, sizeof(__pyx_k_capnp_lib_capnp), 0, 0, 1, 1},
  {&__pyx_kp_s_capnp_lib_capnp_pyx, __pyx_k_capnp_lib_capnp_pyx, sizeof(__pyx_k_capnp_lib_capnp_pyx), 0, 0, 1, 0},
  {&__pyx_kp_s_capnp_list_builder_s, __pyx_k_capnp_list_builder_s, sizeof(__pyx_k_capnp_list_builder_s), 0, 0, 1, 0},
  {&__pyx_kp_s_capnp_list_reader_s, __pyx_k_capnp_list_reader_s, sizeof(__pyx_k_capnp_list_reader_s), 0, 0, 1, 0},
  {&__pyx_n_s_capnp_module_name, __pyx_k_capnp_module_name, sizeof(__pyx_k_capnp_module_name), 0, 0, 1, 1},
  {&__pyx_n_s_capnp_module_name_dashes, __pyx_k_capnp_module_name_dashes, sizeof(__pyx_k_capnp_module_name_dashes), 0, 0, 1, 1},
  {&__pyx_n_s_capnp_module_name_spaces, __pyx_k_capnp_module_name_spaces, sizeof(__pyx_k_capnp_module_name_spaces), 0, 0, 1, 1},
  {&__pyx_kp_s_capnp_types, __pyx_k_capnp_types, sizeof(__pyx_k_capnp_types), 0, 0, 1, 0},
  {&__pyx_n_s_cast_as, __pyx_k_cast_as, sizeof(__pyx_k_cast_as), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_cleanup_global_schema_parser, __pyx_k_cleanup_global_schema_parser, sizeof(__pyx_k_cleanup_global_schema_parser), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_co_filename, __pyx_k_co_filename, sizeof(__pyx_k_co_filename), 0, 0, 1, 1},
  {&__pyx_n_s_codeOrder, __pyx_k_codeOrder, sizeof(__pyx_k_codeOrder), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_collections_2, __pyx_k_collections_2, sizeof(__pyx_k_collections_2), 0, 0, 1, 1},
  {&__pyx_n_s_connect, __pyx_k_connect, sizeof(__pyx_k_connect), 0, 0, 1, 1},
  {&__pyx_n_s_connect_2, __pyx_k_connect_2, sizeof(__pyx_k_connect_2), 0, 0, 1, 1},
  {&__pyx_n_s_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_kp_s_could_not_get_read_buffer, __pyx_k_could_not_get_read_buffer, sizeof(__pyx_k_could_not_get_read_buffer), 0, 0, 1, 0},
  {&__pyx_n_s_create_connection, __pyx_k_create_connection, sizeof(__pyx_k_create_connection), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_decref, __pyx_k_decref, sizeof(__pyx_k_decref), 0, 0, 1, 1},
  {&__pyx_n_s_defaults, __pyx_k_defaults, sizeof(__pyx_k_defaults), 0, 0, 1, 1},
  {&__pyx_n_s_deregister_all_types, __pyx_k_deregister_all_types, sizeof(__pyx_k_deregister_all_types), 0, 0, 1, 1},
  {&__pyx_n_s_description, __pyx_k_description, sizeof(__pyx_k_description), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_dir_name, __pyx_k_dir_name, sizeof(__pyx_k_dir_name), 0, 0, 1, 1},
  {&__pyx_n_s_dirname, __pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 0, 1, 1},
  {&__pyx_n_s_discriminantCount, __pyx_k_discriminantCount, sizeof(__pyx_k_discriminantCount), 0, 0, 1, 1},
  {&__pyx_n_s_discriminantValue, __pyx_k_discriminantValue, sizeof(__pyx_k_discriminantValue), 0, 0, 1, 1},
  {&__pyx_n_s_diskPath, __pyx_k_diskPath, sizeof(__pyx_k_diskPath), 0, 0, 1, 1},
  {&__pyx_n_s_disown, __pyx_k_disown, sizeof(__pyx_k_disown), 0, 0, 1, 1},
  {&__pyx_n_s_displayName, __pyx_k_displayName, sizeof(__pyx_k_displayName), 0, 0, 1, 1},
  {&__pyx_n_s_display_name, __pyx_k_display_name, sizeof(__pyx_k_display_name), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_durability, __pyx_k_durability, sizeof(__pyx_k_durability), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
  {&__pyx_n_s_enum_name, __pyx_k_enum_name, sizeof(__pyx_k_enum_name), 0, 0, 1, 1},
  {&__pyx_n_s_enumerants, __pyx_k_enumerants, sizeof(__pyx_k_enumerants), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_n_s_enums, __pyx_k_enums, sizeof(__pyx_k_enums), 0, 0, 1, 1},
  {&__pyx_n_s_error_func, __pyx_k_error_func, sizeof(__pyx_k_error_func), 0, 0, 1, 1},
  {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
  {&__pyx_kp_s_expected_buffer_like_object_in_F, __pyx_k_expected_buffer_like_object_in_F, sizeof(__pyx_k_expected_buffer_like_object_in_F), 0, 0, 1, 0},
  {&__pyx_kp_s_expected_isSetInUnion_field, __pyx_k_expected_isSetInUnion_field, sizeof(__pyx_k_expected_isSetInUnion_field), 0, 0, 1, 0},
  {&__pyx_kp_s_expected_variable_length_string, __pyx_k_expected_variable_length_string, sizeof(__pyx_k_expected_variable_length_string), 0, 0, 1, 0},
  {&__pyx_n_s_extension, __pyx_k_extension, sizeof(__pyx_k_extension), 0, 0, 1, 1},
  {&__pyx_n_s_extra_paths, __pyx_k_extra_paths, sizeof(__pyx_k_extra_paths), 0, 0, 1, 1},
  {&__pyx_n_s_f_code, __pyx_k_f_code, sizeof(__pyx_k_f_code), 0, 0, 1, 1},
  {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
  {&__pyx_n_s_fdopen, __pyx_k_fdopen, sizeof(__pyx_k_fdopen), 0, 0, 1, 1},
  {&__pyx_n_s_field, __pyx_k_field, sizeof(__pyx_k_field), 0, 0, 1, 1},
  {&__pyx_n_s_field_schema, __pyx_k_field_schema, sizeof(__pyx_k_field_schema), 0, 0, 1, 1},
  {&__pyx_kp_s_field_schema_for_s, __pyx_k_field_schema_for_s, sizeof(__pyx_k_field_schema_for_s), 0, 0, 1, 0},
  {&__pyx_n_s_fieldnames, __pyx_k_fieldnames, sizeof(__pyx_k_fieldnames), 0, 0, 1, 1},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__pyx_n_s_fields_list, __pyx_k_fields_list, sizeof(__pyx_k_fields_list), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_file_2, __pyx_k_file_2, sizeof(__pyx_k_file_2), 0, 0, 1, 1},
  {&__pyx_n_s_file_name, __pyx_k_file_name, sizeof(__pyx_k_file_name), 0, 0, 1, 1},
  {&__pyx_n_s_fileno, __pyx_k_fileno, sizeof(__pyx_k_fileno), 0, 0, 1, 1},
  {&__pyx_n_s_find_method_args, __pyx_k_find_method_args, sizeof(__pyx_k_find_method_args), 0, 0, 1, 1},
  {&__pyx_n_s_find_module, __pyx_k_find_module, sizeof(__pyx_k_find_module), 0, 0, 1, 1},
  {&__pyx_n_s_firstSegmentWordSize, __pyx_k_firstSegmentWordSize, sizeof(__pyx_k_firstSegmentWordSize), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_from_bytes, __pyx_k_from_bytes, sizeof(__pyx_k_from_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_from_bytes_packed, __pyx_k_from_bytes_packed, sizeof(__pyx_k_from_bytes_packed), 0, 0, 1, 1},
  {&__pyx_n_s_from_dict, __pyx_k_from_dict, sizeof(__pyx_k_from_dict), 0, 0, 1, 1},
  {&__pyx_n_s_from_segments, __pyx_k_from_segments, sizeof(__pyx_k_from_segments), 0, 0, 1, 1},
  {&__pyx_n_s_fulfill, __pyx_k_fulfill, sizeof(__pyx_k_fulfill), 0, 0, 1, 1},
  {&__pyx_n_s_fullname, __pyx_k_fullname, sizeof(__pyx_k_fullname), 0, 0, 1, 1},
  {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
  {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_getTimer, __pyx_k_getTimer, sizeof(__pyx_k_getTimer), 0, 0, 1, 1},
  {&__pyx_n_s_get_2, __pyx_k_get_2, sizeof(__pyx_k_get_2), 0, 0, 1, 1},
  {&__pyx_n_s_get_by_field, __pyx_k_get_by_field, sizeof(__pyx_k_get_by_field), 0, 0, 1, 1},
  {&__pyx_n_s_get_nested, __pyx_k_get_nested, sizeof(__pyx_k_get_nested), 0, 0, 1, 1},
  {&__pyx_n_s_get_proto, __pyx_k_get_proto, sizeof(__pyx_k_get_proto), 0, 0, 1, 1},
  {&__pyx_n_s_get_results, __pyx_k_get_results, sizeof(__pyx_k_get_results), 0, 0, 1, 1},
  {&__pyx_n_s_get_root, __pyx_k_get_root, sizeof(__pyx_k_get_root), 0, 0, 1, 1},
  {&__pyx_n_s_get_root_as_any, __pyx_k_get_root_as_any, sizeof(__pyx_k_get_root_as_any), 0, 0, 1, 1},
  {&__pyx_n_s_get_segments_for_output, __pyx_k_get_segments_for_output, sizeof(__pyx_k_get_segments_for_output), 0, 0, 1, 1},
  {&__pyx_n_s_getcwd, __pyx_k_getcwd, sizeof(__pyx_k_getcwd), 0, 0, 1, 1},
  {&__pyx_n_s_getfullargspec, __pyx_k_getfullargspec, sizeof(__pyx_k_getfullargspec), 0, 0, 1, 1},
  {&__pyx_n_s_getsourcefile, __pyx_k_getsourcefile, sizeof(__pyx_k_getsourcefile), 0, 0, 1, 1},
  {&__pyx_n_s_getsourcelines, __pyx_k_getsourcelines, sizeof(__pyx_k_getsourcelines), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_global_schema_parser, __pyx_k_global_schema_parser, sizeof(__pyx_k_global_schema_parser), 0, 0, 1, 1},
  {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
  {&__pyx_n_s_has, __pyx_k_has, sizeof(__pyx_k_has), 0, 0, 1, 1},
  {&__pyx_n_s_has_by_field, __pyx_k_has_by_field, sizeof(__pyx_k_has_by_field), 0, 0, 1, 1},
  {&__pyx_kp_s_has_no_such, __pyx_k_has_no_such, sizeof(__pyx_k_has_no_such), 0, 0, 1, 0},
  {&__pyx_n_s_has_underscores, __pyx_k_has_underscores, sizeof(__pyx_k_has_underscores), 0, 0, 1, 1},
  {&__pyx_n_s_host_string, __pyx_k_host_string, sizeof(__pyx_k_host_string), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_ignore_errors, __pyx_k_ignore_errors, sizeof(__pyx_k_ignore_errors), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_importer, __pyx_k_importer, sizeof(__pyx_k_importer), 0, 0, 1, 1},
  {&__pyx_n_s_imports, __pyx_k_imports, sizeof(__pyx_k_imports), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_init_2, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1},
  {&__pyx_n_s_init_3, __pyx_k_init_3, sizeof(__pyx_k_init_3), 0, 0, 1, 1},
  {&__pyx_n_s_init_as_list, __pyx_k_init_as_list, sizeof(__pyx_k_init_as_list), 0, 0, 1, 1},
  {&__pyx_n_s_init_by_field, __pyx_k_init_by_field, sizeof(__pyx_k_init_by_field), 0, 0, 1, 1},
  {&__pyx_n_s_init_capnp_api, __pyx_k_init_capnp_api, sizeof(__pyx_k_init_capnp_api), 0, 0, 1, 1},
  {&__pyx_n_s_init_resizable_list, __pyx_k_init_resizable_list, sizeof(__pyx_k_init_resizable_list), 0, 0, 1, 1},
  {&__pyx_n_s_init_root, __pyx_k_init_root, sizeof(__pyx_k_init_root), 0, 0, 1, 1},
  {&__pyx_kp_s_input_length_must_be_a_multiple, __pyx_k_input_length_must_be_a_multiple, sizeof(__pyx_k_input_length_must_be_a_multiple), 0, 0, 1, 0},
  {&__pyx_n_s_inspect, __pyx_k_inspect, sizeof(__pyx_k_inspect), 0, 0, 1, 1},
  {&__pyx_n_s_inspect_2, __pyx_k_inspect_2, sizeof(__pyx_k_inspect_2), 0, 0, 1, 1},
  {&__pyx_n_s_instancecheck, __pyx_k_instancecheck, sizeof(__pyx_k_instancecheck), 0, 0, 1, 1},
  {&__pyx_kp_s_invalid_module_expected_s_got_s, __pyx_k_invalid_module_expected_s_got_s, sizeof(__pyx_k_invalid_module_expected_s_got_s), 0, 0, 1, 0},
  {&__pyx_n_s_isConst, __pyx_k_isConst, sizeof(__pyx_k_isConst), 0, 0, 1, 1},
  {&__pyx_n_s_isEnum, __pyx_k_isEnum, sizeof(__pyx_k_isEnum), 0, 0, 1, 1},
  {&__pyx_n_s_isInterface, __pyx_k_isInterface, sizeof(__pyx_k_isInterface), 0, 0, 1, 1},
  {&__pyx_n_s_isStruct, __pyx_k_isStruct, sizeof(__pyx_k_isStruct), 0, 0, 1, 1},
  {&__pyx_n_s_is_abs, __pyx_k_is_abs, sizeof(__pyx_k_is_abs), 0, 0, 1, 1},
  {&__pyx_n_s_is_consumed, __pyx_k_is_consumed, sizeof(__pyx_k_is_consumed), 0, 0, 1, 1},
  {&__pyx_n_s_is_file, __pyx_k_is_file, sizeof(__pyx_k_is_file), 0, 0, 1, 1},
  {&__pyx_n_s_isabs, __pyx_k_isabs, sizeof(__pyx_k_isabs), 0, 0, 1, 1},
  {&__pyx_n_s_isdir, __pyx_k_isdir, sizeof(__pyx_k_isdir), 0, 0, 1, 1},
  {&__pyx_n_s_isfile, __pyx_k_isfile, sizeof(__pyx_k_isfile), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_join_path, __pyx_k_join_path, sizeof(__pyx_k_join_path), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_klass, __pyx_k_klass, sizeof(__pyx_k_klass), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
  {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1},
  {&__pyx_n_s_load_2, __pyx_k_load_2, sizeof(__pyx_k_load_2), 0, 0, 1, 1},
  {&__pyx_n_s_load_locals__load, __pyx_k_load_locals__load, sizeof(__pyx_k_load_locals__load), 0, 0, 1, 1},
  {&__pyx_n_s_load_locals__load_locals_Builder, __pyx_k_load_locals__load_locals_Builder, sizeof(__pyx_k_load_locals__load_locals_Builder), 0, 0, 1, 1},
  {&__pyx_n_s_load_locals__load_locals_Builder_2, __pyx_k_load_locals__load_locals_Builder_2, sizeof(__pyx_k_load_locals__load_locals_Builder_2), 0, 0, 1, 1},
  {&__pyx_n_s_load_locals__load_locals_Reader, __pyx_k_load_locals__load_locals_Reader, sizeof(__pyx_k_load_locals__load_locals_Reader), 0, 0, 1, 1},
  {&__pyx_n_s_load_locals__load_locals_Reader_2, __pyx_k_load_locals__load_locals_Reader_2, sizeof(__pyx_k_load_locals__load_locals_Reader_2), 0, 0, 1, 1},
  {&__pyx_n_s_load_module, __pyx_k_load_module, sizeof(__pyx_k_load_module), 0, 0, 1, 1},
  {&__pyx_n_s_local, __pyx_k_local, sizeof(__pyx_k_local), 0, 0, 1, 1},
  {&__pyx_n_s_local_module, __pyx_k_local_module, sizeof(__pyx_k_local_module), 0, 0, 1, 1},
  {&__pyx_n_s_loop, __pyx_k_loop, sizeof(__pyx_k_loop), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum, __pyx_k_make_enum, sizeof(__pyx_k_make_enum), 0, 0, 1, 1},
  {&__pyx_n_s_make_enum_locals_genexpr, __pyx_k_make_enum_locals_genexpr, sizeof(__pyx_k_make_enum_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_message_to_packed_bytes, __pyx_k_message_to_packed_bytes, sizeof(__pyx_k_message_to_packed_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_meta_path, __pyx_k_meta_path, sizeof(__pyx_k_meta_path), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_method_names_inherited, __pyx_k_method_names_inherited, sizeof(__pyx_k_method_names_inherited), 0, 0, 1, 1},
  {&__pyx_n_s_methods_inherited, __pyx_k_methods_inherited, sizeof(__pyx_k_methods_inherited), 0, 0, 1, 1},
  {&__pyx_n_s_mod_parts, __pyx_k_mod_parts, sizeof(__pyx_k_mod_parts), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_module_2, __pyx_k_module_2, sizeof(__pyx_k_module_2), 0, 0, 1, 1},
  {&__pyx_n_s_module_name, __pyx_k_module_name, sizeof(__pyx_k_module_name), 0, 0, 1, 1},
  {&__pyx_n_s_modules, __pyx_k_modules, sizeof(__pyx_k_modules), 0, 0, 1, 1},
  {&__pyx_n_s_modules_by_id, __pyx_k_modules_by_id, sizeof(__pyx_k_modules_by_id), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_named, __pyx_k_named, sizeof(__pyx_k_named), 0, 0, 1, 1},
  {&__pyx_n_s_nature, __pyx_k_nature, sizeof(__pyx_k_nature), 0, 0, 1, 1},
  {&__pyx_n_s_nestedNodes, __pyx_k_nestedNodes, sizeof(__pyx_k_nestedNodes), 0, 0, 1, 1},
  {&__pyx_n_s_nesting_limit, __pyx_k_nesting_limit, sizeof(__pyx_k_nesting_limit), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_n_s_new_client, __pyx_k_new_client, sizeof(__pyx_k_new_client), 0, 0, 1, 1},
  {&__pyx_n_s_new_message, __pyx_k_new_message, sizeof(__pyx_k_new_message), 0, 0, 1, 1},
  {&__pyx_n_s_new_orphan, __pyx_k_new_orphan, sizeof(__pyx_k_new_orphan), 0, 0, 1, 1},
  {&__pyx_n_s_new_server, __pyx_k_new_server, sizeof(__pyx_k_new_server), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_node, __pyx_k_node, sizeof(__pyx_k_node), 0, 0, 1, 1},
  {&__pyx_n_s_nodeProto, __pyx_k_nodeProto, sizeof(__pyx_k_nodeProto), 0, 0, 1, 1},
  {&__pyx_n_s_nodeProto_2, __pyx_k_nodeProto_2, sizeof(__pyx_k_nodeProto_2), 0, 0, 1, 1},
  {&__pyx_n_s_nodeSchema, __pyx_k_nodeSchema, sizeof(__pyx_k_nodeSchema), 0, 0, 1, 1},
  {&__pyx_n_s_nodeSchema_2, __pyx_k_nodeSchema_2, sizeof(__pyx_k_nodeSchema_2), 0, 0, 1, 1},
  {&__pyx_n_s_non_union_fields, __pyx_k_non_union_fields, sizeof(__pyx_k_non_union_fields), 0, 0, 1, 1},
  {&__pyx_n_s_numParents, __pyx_k_numParents, sizeof(__pyx_k_numParents), 0, 0, 1, 1},
  {&__pyx_n_s_num_first_segment_words, __pyx_k_num_first_segment_words, sizeof(__pyx_k_num_first_segment_words), 0, 0, 1, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_on_disconnect, __pyx_k_on_disconnect, sizeof(__pyx_k_on_disconnect), 0, 0, 1, 1},
  {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1},
  {&__pyx_n_s_ordered, __pyx_k_ordered, sizeof(__pyx_k_ordered), 0, 0, 1, 1},
  {&__pyx_n_s_orphan, __pyx_k_orphan, sizeof(__pyx_k_orphan), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_os_2, __pyx_k_os_2, sizeof(__pyx_k_os_2), 0, 0, 1, 1},
  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
  {&__pyx_n_s_package_path, __pyx_k_package_path, sizeof(__pyx_k_package_path), 0, 0, 1, 1},
  {&__pyx_n_s_param_type, __pyx_k_param_type, sizeof(__pyx_k_param_type), 0, 0, 1, 1},
  {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
  {&__pyx_n_s_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 0, 0, 1, 1},
  {&__pyx_n_s_parent_2, __pyx_k_parent_2, sizeof(__pyx_k_parent_2), 0, 0, 1, 1},
  {&__pyx_n_s_parse_disk_file, __pyx_k_parse_disk_file, sizeof(__pyx_k_parse_disk_file), 0, 0, 1, 1},
  {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
  {&__pyx_n_s_partial, __pyx_k_partial, sizeof(__pyx_k_partial), 0, 0, 1, 1},
  {&__pyx_n_s_partial_2, __pyx_k_partial_2, sizeof(__pyx_k_partial_2), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_path_2, __pyx_k_path_2, sizeof(__pyx_k_path_2), 0, 0, 1, 1},
  {&__pyx_n_s_paths, __pyx_k_paths, sizeof(__pyx_k_paths), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_n_s_pickle_helper, __pyx_k_pickle_helper, sizeof(__pyx_k_pickle_helper), 0, 0, 1, 1},
  {&__pyx_n_s_pipe, __pyx_k_pipe, sizeof(__pyx_k_pipe), 0, 0, 1, 1},
  {&__pyx_n_s_poll_forever, __pyx_k_poll_forever, sizeof(__pyx_k_poll_forever), 0, 0, 1, 1},
  {&__pyx_n_s_poll_once, __pyx_k_poll_once, sizeof(__pyx_k_poll_once), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
  {&__pyx_n_s_proto, __pyx_k_proto, sizeof(__pyx_k_proto), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__DynamicCapabilit, __pyx_k_pyx_unpickle__DynamicCapabilit, sizeof(__pyx_k_pyx_unpickle__DynamicCapabilit), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__DynamicEnumField, __pyx_k_pyx_unpickle__DynamicEnumField, sizeof(__pyx_k_pyx_unpickle__DynamicEnumField), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__DynamicResizable, __pyx_k_pyx_unpickle__DynamicResizable, sizeof(__pyx_k_pyx_unpickle__DynamicResizable), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__MessageSize, __pyx_k_pyx_unpickle__MessageSize, sizeof(__pyx_k_pyx_unpickle__MessageSize), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle__MultipleBytesMes, __pyx_k_pyx_unpickle__MultipleBytesMes, sizeof(__pyx_k_pyx_unpickle__MultipleBytesMes), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
  {&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1},
  {&__pyx_n_s_random_2, __pyx_k_random_2, sizeof(__pyx_k_random_2), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_raw_field, __pyx_k_raw_field, sizeof(__pyx_k_raw_field), 0, 0, 1, 1},
  {&__pyx_n_s_raw_schema, __pyx_k_raw_schema, sizeof(__pyx_k_raw_schema), 0, 0, 1, 1},
  {&__pyx_n_s_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 0, 1, 1},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_read_multiple, __pyx_k_read_multiple, sizeof(__pyx_k_read_multiple), 0, 0, 1, 1},
  {&__pyx_n_s_read_multiple_bytes, __pyx_k_read_multiple_bytes, sizeof(__pyx_k_read_multiple_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_read_multiple_bytes_packed, __pyx_k_read_multiple_bytes_packed, sizeof(__pyx_k_read_multiple_bytes_packed), 0, 0, 1, 1},
  {&__pyx_n_s_read_multiple_packed, __pyx_k_read_multiple_packed, sizeof(__pyx_k_read_multiple_packed), 0, 0, 1, 1},
  {&__pyx_n_s_read_packed, __pyx_k_read_packed, sizeof(__pyx_k_read_packed), 0, 0, 1, 1},
  {&__pyx_n_s_reader, __pyx_k_reader, sizeof(__pyx_k_reader), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_register_type, __pyx_k_register_type, sizeof(__pyx_k_register_type), 0, 0, 1, 1},
  {&__pyx_n_s_release_params, __pyx_k_release_params, sizeof(__pyx_k_release_params), 0, 0, 1, 1},
  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_s_remove_2, __pyx_k_remove_2, sizeof(__pyx_k_remove_2), 0, 0, 1, 1},
  {&__pyx_n_s_remove_import_hook, __pyx_k_remove_import_hook, sizeof(__pyx_k_remove_import_hook), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_s_request, __pyx_k_request, sizeof(__pyx_k_request), 0, 0, 1, 1},
  {&__pyx_n_s_request_helper, __pyx_k_request_helper, sizeof(__pyx_k_request_helper), 0, 0, 1, 1},
  {&__pyx_n_s_results, __pyx_k_results, sizeof(__pyx_k_results), 0, 0, 1, 1},
  {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
  {&__pyx_n_s_reverse_mapping, __pyx_k_reverse_mapping, sizeof(__pyx_k_reverse_mapping), 0, 0, 1, 1},
  {&__pyx_n_s_run_forever, __pyx_k_run_forever, sizeof(__pyx_k_run_forever), 0, 0, 1, 1},
  {&__pyx_kp_s_s_builder_s, __pyx_k_s_builder_s, sizeof(__pyx_k_s_builder_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_enum, __pyx_k_s_enum, sizeof(__pyx_k_s_enum), 0, 0, 1, 0},
  {&__pyx_kp_s_s_reader_s, __pyx_k_s_reader_s, sizeof(__pyx_k_s_reader_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_which_enum, __pyx_k_s_which_enum, sizeof(__pyx_k_s_which_enum), 0, 0, 1, 0},
  {&__pyx_n_s_schema, __pyx_k_schema, sizeof(__pyx_k_schema), 0, 0, 1, 1},
  {&__pyx_n_s_schema_2, __pyx_k_schema_2, sizeof(__pyx_k_schema_2), 0, 0, 1, 1},
  {&__pyx_kp_s_schema_for_s, __pyx_k_schema_for_s, sizeof(__pyx_k_schema_for_s), 0, 0, 1, 0},
  {&__pyx_n_s_schema_id, __pyx_k_schema_id, sizeof(__pyx_k_schema_id), 0, 0, 1, 1},
  {&__pyx_n_s_scopeId, __pyx_k_scopeId, sizeof(__pyx_k_scopeId), 0, 0, 1, 1},
  {&__pyx_n_s_segments, __pyx_k_segments, sizeof(__pyx_k_segments), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_kp_s_self__error_handler_self__task_s, __pyx_k_self__error_handler_self__task_s, sizeof(__pyx_k_self__error_handler_self__task_s), 0, 0, 1, 0},
  {&__pyx_kp_s_self__pipe_cannot_be_converted_t, __pyx_k_self__pipe_cannot_be_converted_t, sizeof(__pyx_k_self__pipe_cannot_be_converted_t), 0, 0, 1, 0},
  {&__pyx_kp_s_self__seg_ptrs_self_thisptr_self, __pyx_k_self__seg_ptrs_self_thisptr_self, sizeof(__pyx_k_self__seg_ptrs_self_thisptr_self), 0, 0, 1, 0},
  {&__pyx_kp_s_self_buffered_stream_self_stream, __pyx_k_self_buffered_stream_self_stream, sizeof(__pyx_k_self_buffered_stream_self_stream), 0, 0, 1, 0},
  {&__pyx_kp_s_self_buffered_stream_self_stream_2, __pyx_k_self_buffered_stream_self_stream_2, sizeof(__pyx_k_self_buffered_stream_self_stream_2), 0, 0, 1, 0},
  {&__pyx_kp_s_self_stream_self_thisptr_self_vi, __pyx_k_self_stream_self_thisptr_self_vi, sizeof(__pyx_k_self_stream_self_thisptr_self_vi), 0, 0, 1, 0},
  {&__pyx_kp_s_self_thisptr_cannot_be_converted, __pyx_k_self_thisptr_cannot_be_converted, sizeof(__pyx_k_self_thisptr_cannot_be_converted), 0, 0, 1, 0},
  {&__pyx_kp_s_self_thisptr_self_thisptr_child, __pyx_k_self_thisptr_self_thisptr_child, sizeof(__pyx_k_self_thisptr_self_thisptr_child), 0, 0, 1, 0},
  {&__pyx_kp_s_self_thisptr_self_view_cannot_be, __pyx_k_self_thisptr_self_view_cannot_be, sizeof(__pyx_k_self_thisptr_self_view_cannot_be), 0, 0, 1, 0},
  {&__pyx_kp_s_self_view_cannot_be_converted_to, __pyx_k_self_view_cannot_be_converted_to, sizeof(__pyx_k_self_view_cannot_be_converted_to), 0, 0, 1, 0},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_send_2, __pyx_k_send_2, sizeof(__pyx_k_send_2), 0, 0, 1, 1},
  {&__pyx_n_s_send_helper, __pyx_k_send_helper, sizeof(__pyx_k_send_helper), 0, 0, 1, 1},
  {&__pyx_n_s_sep, __pyx_k_sep, sizeof(__pyx_k_sep), 0, 0, 1, 1},
  {&__pyx_n_s_sequential, __pyx_k_sequential, sizeof(__pyx_k_sequential), 0, 0, 1, 1},
  {&__pyx_n_s_server, __pyx_k_server, sizeof(__pyx_k_server), 0, 0, 1, 1},
  {&__pyx_n_s_server_init, __pyx_k_server_init, sizeof(__pyx_k_server_init), 0, 0, 1, 1},
  {&__pyx_n_s_server_self, __pyx_k_server_self, sizeof(__pyx_k_server_self), 0, 0, 1, 1},
  {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
  {&__pyx_n_s_set_2, __pyx_k_set_2, sizeof(__pyx_k_set_2), 0, 0, 1, 1},
  {&__pyx_n_s_set_as_text, __pyx_k_set_as_text, sizeof(__pyx_k_set_as_text), 0, 0, 1, 1},
  {&__pyx_n_s_set_by_field, __pyx_k_set_by_field, sizeof(__pyx_k_set_by_field), 0, 0, 1, 1},
  {&__pyx_n_s_set_root, __pyx_k_set_root, sizeof(__pyx_k_set_root), 0, 0, 1, 1},
  {&__pyx_n_s_setsockopt, __pyx_k_setsockopt, sizeof(__pyx_k_setsockopt), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_skip_copy, __pyx_k_skip_copy, sizeof(__pyx_k_skip_copy), 0, 0, 1, 1},
  {&__pyx_n_s_sleep, __pyx_k_sleep, sizeof(__pyx_k_sleep), 0, 0, 1, 1},
  {&__pyx_n_s_slots, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1},
  {&__pyx_n_s_socket, __pyx_k_socket, sizeof(__pyx_k_socket), 0, 0, 1, 1},
  {&__pyx_n_s_socket_2, __pyx_k_socket_2, sizeof(__pyx_k_socket_2), 0, 0, 1, 1},
  {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_n_s_str_2, __pyx_k_str_2, sizeof(__pyx_k_str_2), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {&__pyx_n_s_struct_reducer, __pyx_k_struct_reducer, sizeof(__pyx_k_struct_reducer), 0, 0, 1, 1},
  {&__pyx_n_s_sub_module, __pyx_k_sub_module, sizeof(__pyx_k_sub_module), 0, 0, 1, 1},
  {&__pyx_n_s_subversion, __pyx_k_subversion, sizeof(__pyx_k_subversion), 0, 0, 1, 1},
  {&__pyx_n_s_superclasses, __pyx_k_superclasses, sizeof(__pyx_k_superclasses), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_sys_2, __pyx_k_sys_2, sizeof(__pyx_k_sys_2), 0, 0, 1, 1},
  {&__pyx_n_s_tail_call, __pyx_k_tail_call, sizeof(__pyx_k_tail_call), 0, 0, 1, 1},
  {&__pyx_n_s_tb_frame, __pyx_k_tb_frame, sizeof(__pyx_k_tb_frame), 0, 0, 1, 1},
  {&__pyx_n_s_tb_lineno, __pyx_k_tb_lineno, sizeof(__pyx_k_tb_lineno), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_then, __pyx_k_then, sizeof(__pyx_k_then), 0, 0, 1, 1},
  {&__pyx_n_s_threaded, __pyx_k_threaded, sizeof(__pyx_k_threaded), 0, 0, 1, 1},
  {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
  {&__pyx_n_s_threading_2, __pyx_k_threading_2, sizeof(__pyx_k_threading_2), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_to_bytes, __pyx_k_to_bytes, sizeof(__pyx_k_to_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_to_bytes_packed, __pyx_k_to_bytes_packed, sizeof(__pyx_k_to_bytes_packed), 0, 0, 1, 1},
  {&__pyx_n_s_to_bytes_packed_helper, __pyx_k_to_bytes_packed_helper, sizeof(__pyx_k_to_bytes_packed_helper), 0, 0, 1, 1},
  {&__pyx_n_s_to_dict, __pyx_k_to_dict, sizeof(__pyx_k_to_dict), 0, 0, 1, 1},
  {&__pyx_n_s_to_python, __pyx_k_to_python, sizeof(__pyx_k_to_python), 0, 0, 1, 1},
  {&__pyx_n_s_to_segments, __pyx_k_to_segments, sizeof(__pyx_k_to_segments), 0, 0, 1, 1},
  {&__pyx_n_s_total_size, __pyx_k_total_size, sizeof(__pyx_k_total_size), 0, 0, 1, 1},
  {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_traceback_2, __pyx_k_traceback_2, sizeof(__pyx_k_traceback_2), 0, 0, 1, 1},
  {&__pyx_n_s_traversal_limit_in_words, __pyx_k_traversal_limit_in_words, sizeof(__pyx_k_traversal_limit_in_words), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_type_2, __pyx_k_type_2, sizeof(__pyx_k_type_2), 0, 0, 1, 1},
  {&__pyx_n_s_type_registry, __pyx_k_type_registry, sizeof(__pyx_k_type_registry), 0, 0, 1, 1},
  {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
  {&__pyx_n_s_union_field, __pyx_k_union_field, sizeof(__pyx_k_union_field), 0, 0, 1, 1},
  {&__pyx_kp_s_unix, __pyx_k_unix, sizeof(__pyx_k_unix), 0, 0, 1, 0},
  {&__pyx_n_s_upcast, __pyx_k_upcast, sizeof(__pyx_k_upcast), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
  {&__pyx_kp_s_usr_include, __pyx_k_usr_include, sizeof(__pyx_k_usr_include), 0, 0, 1, 0},
  {&__pyx_kp_s_usr_include_capnp, __pyx_k_usr_include_capnp, sizeof(__pyx_k_usr_include_capnp), 0, 0, 1, 0},
  {&__pyx_kp_s_usr_local_include, __pyx_k_usr_local_include, sizeof(__pyx_k_usr_local_include), 0, 0, 1, 0},
  {&__pyx_kp_s_usr_local_include_capnp, __pyx_k_usr_local_include_capnp, sizeof(__pyx_k_usr_local_include_capnp), 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_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1},
  {&__pyx_n_s_wait_2, __pyx_k_wait_2, sizeof(__pyx_k_wait_2), 0, 0, 1, 1},
  {&__pyx_n_s_wait_forever, __pyx_k_wait_forever, sizeof(__pyx_k_wait_forever), 0, 0, 1, 1},
  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  {&__pyx_n_s_warn_explicit, __pyx_k_warn_explicit, sizeof(__pyx_k_warn_explicit), 0, 0, 1, 1},
  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {&__pyx_n_s_warnings_2, __pyx_k_warnings_2, sizeof(__pyx_k_warnings_2), 0, 0, 1, 1},
  {&__pyx_n_s_which, __pyx_k_which, sizeof(__pyx_k_which), 0, 0, 1, 1},
  {&__pyx_n_s_which_2, __pyx_k_which_2, sizeof(__pyx_k_which_2), 0, 0, 1, 1},
  {&__pyx_n_s_which_str, __pyx_k_which_str, sizeof(__pyx_k_which_str), 0, 0, 1, 1},
  {&__pyx_n_s_word_count, __pyx_k_word_count, sizeof(__pyx_k_word_count), 0, 0, 1, 1},
  {&__pyx_n_s_wrapper, __pyx_k_wrapper, sizeof(__pyx_k_wrapper), 0, 0, 1, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_n_s_write_message_to_fd, __pyx_k_write_message_to_fd, sizeof(__pyx_k_write_message_to_fd), 0, 0, 1, 1},
  {&__pyx_n_s_write_packed_message_to_fd, __pyx_k_write_packed_message_to_fd, sizeof(__pyx_k_write_packed_message_to_fd), 0, 0, 1, 1},
  {&__pyx_n_s_writer, __pyx_k_writer, sizeof(__pyx_k_writer), 0, 0, 1, 1},
  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 210, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 2944, __pyx_L1_error)
  __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) __PYX_ERR(0, 64, __pyx_L1_error)
  __pyx_builtin_UserWarning = __Pyx_GetBuiltinName(__pyx_n_s_UserWarning); if (!__pyx_builtin_UserWarning) __PYX_ERR(0, 84, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 116, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 122, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 236, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 387, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 903, __pyx_L1_error)
  #if PY_MAJOR_VERSION >= 3
  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 2587, __pyx_L1_error)
  #else
  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 2587, __pyx_L1_error)
  #endif
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 2645, __pyx_L1_error)
  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 3274, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 3277, __pyx_L1_error)
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 3636, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(3, 109, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "capnp/lib/capnp.pyx":256
 *         return (exc_tb.tb_frame.f_code.co_filename.encode(), exc_tb.tb_lineno, (repr(exc_type) + ':' + str(exc_obj)).encode())
 *     except:
 *         return (b'', 0, b"Couldn't determine python exception")             # <<<<<<<<<<<<<<
 * 
 * cdef schema_cpp.ReaderOptions make_reader_opts(traversal_limit_in_words, nesting_limit) with gil:
 */
  __pyx_tuple__5 = PyTuple_Pack(3, __pyx_kp_b__4, __pyx_int_0, __pyx_kp_b_Couldn_t_determine_python_except); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "capnp/lib/capnp.pyx":387
 *         cdef uint size = self.thisptr.size()
 *         if index >= size:
 *             raise IndexError('Out of bounds')             # <<<<<<<<<<<<<<
 *         index = index % size
 *         return self._get(index)
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Out_of_bounds); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "capnp/lib/capnp.pyx":2182
 *         try:
 *             if name.endswith('_request'):
 *                 short_name = name[:-8]             # <<<<<<<<<<<<<<
 *                 if short_name not in self.schema.method_names_inherited:
 *                     raise AttributeError('Method named %s not found' % short_name)
 */
  __pyx_slice__39 = PySlice_New(Py_None, __pyx_int_neg_8, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 2182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__39);
  __Pyx_GIVEREF(__pyx_slice__39);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "capnp/lib/capnp.pyx":2333
 *     cpdef _connect(self, host_string):
 *         if host_string.startswith('unix:'):
 *             path = host_string[5:]             # <<<<<<<<<<<<<<
 *             sock = _socket.socket(_socket.AF_UNIX, _socket.SOCK_STREAM)
 *             sock.connect(path)
 */
  __pyx_slice__46 = PySlice_New(__pyx_int_5, Py_None, Py_None); if (unlikely(!__pyx_slice__46)) __PYX_ERR(0, 2333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__46);
  __Pyx_GIVEREF(__pyx_slice__46);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_self__error_handler_self__task_s); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "(tree fragment)":4
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._error_handler,self._task_set,self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_self__error_handler_self__task_s); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_self__pipe_cannot_be_converted_t); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "(tree fragment)":4
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._pipe cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_self__pipe_cannot_be_converted_t); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_self_thisptr_child); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr,self.thisptr_child cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_self_thisptr_child); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "capnp/lib/capnp.pyx":2954
 *         for field, raw_field in zip(schema.node.struct.fields, schema.fields_list):
 *             if field.which() == 'group':
 *                 name = field.name[0].upper() + field.name[1:]             # <<<<<<<<<<<<<<
 *                 raw_schema = raw_field.schema
 *                 field_schema = raw_schema.node.struct
 */
  __pyx_slice__79 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__79)) __PYX_ERR(0, 2954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__79);
  __Pyx_GIVEREF(__pyx_slice__79);

  /* "capnp/lib/capnp.pyx":3130
 * class _InterfaceModule(object):
 *     def __init__(self, schema, name):
 *         def server_init(server_self):             # <<<<<<<<<<<<<<
 *             pass
 *         self.schema = schema
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_server_self); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 3130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_server_init, 3130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 3130, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "capnp/lib/capnp.pyx":3248
 *                         _schema = local_module.schema
 *                         def __new__(self):
 *                             raise TypeError('This is an abstract base class')             # <<<<<<<<<<<<<<
 *                     class Builder(_DynamicStructBuilder):
 *                         """An abstract base class.  Builders are 'instances' of this class."""
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_This_is_an_abstract_base_class); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 3248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "capnp/lib/capnp.pyx":3247
 *                         __slots__ = []
 *                         _schema = local_module.schema
 *                         def __new__(self):             # <<<<<<<<<<<<<<
 *                             raise TypeError('This is an abstract base class')
 *                     class Builder(_DynamicStructBuilder):
 */
  __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 3247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_new, 3247, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 3247, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3254
 *                         __slots__ = []
 *                         _schema = local_module.schema
 *                         def __new__(self):             # <<<<<<<<<<<<<<
 *                             raise TypeError('This is an abstract base class')
 * 
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 3254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_new, 3254, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 3254, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3228
 * 
 *         """
 *         def _load(nodeSchema, module):             # <<<<<<<<<<<<<<
 *             module._nodeSchema = nodeSchema
 *             nodeProto = nodeSchema.get_proto()
 */
  __pyx_tuple__90 = PyTuple_Pack(9, __pyx_n_s_nodeSchema, __pyx_n_s_module, __pyx_n_s_nodeProto_2, __pyx_n_s_node, __pyx_n_s_local_module, __pyx_n_s_schema, __pyx_n_s_proto, __pyx_n_s_Reader, __pyx_n_s_Builder); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 3228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_load, 3228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 3228, __pyx_L1_error)

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "capnp/lib/capnp.pyx":3312
 * 
 *     def __init__(self):
 *         raise NotImplementedError("This is an abstract base class. You should use MallocMessageBuilder instead")             # <<<<<<<<<<<<<<
 * 
 *     cpdef init_root(self, schema):
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s_This_is_an_abstract_base_class_Y); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 3312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_self_stream_self_thisptr_self_vi); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "(tree fragment)":4
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.stream,self.thisptr,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_s_self_stream_self_thisptr_self_vi); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__108 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_s_self_buffered_stream_self_stream); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "(tree fragment)":4
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_self_buffered_stream_self_stream); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__113 = PyTuple_Pack(1, __pyx_kp_s_self_buffered_stream_self_stream); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "(tree fragment)":4
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__114 = PyTuple_Pack(1, __pyx_kp_s_self_buffered_stream_self_stream); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "capnp/lib/capnp.pyx":3707
 *             self._object_to_pin = view
 *         else:
 *             raise TypeError('expected buffer-like object in FlatArrayMessageReader')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_s_expected_buffer_like_object_in_F); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 3707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_s_self_buffered_stream_self_stream_2); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);

  /* "(tree fragment)":4
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.buffered_stream,self.stream,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__117 = PyTuple_Pack(1, __pyx_kp_s_self_buffered_stream_self_stream_2); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_s_self_view_cannot_be_converted_to); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "(tree fragment)":4
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_s_self_view_cannot_be_converted_to); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "capnp/lib/capnp.pyx":3797
 *         cdef int ret = PyObject_GetBuffer(other, &self.view, PyBUF_SIMPLE)
 *         if ret < 0:
 *           raise ValueError("Invalid buffer passed to BufferView")             # <<<<<<<<<<<<<<
 *         self.buf = <char*>self.view.buf
 * 
 */
  __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_s_Invalid_buffer_passed_to_BufferV); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 3797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__121 = PyTuple_Pack(1, __pyx_kp_s_self_view_cannot_be_converted_to); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "(tree fragment)":4
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__122 = PyTuple_Pack(1, __pyx_kp_s_self_view_cannot_be_converted_to); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "capnp/lib/capnp.pyx":3843
 *         sz = len(buf)
 *         if sz % 8 != 0:
 *             raise ValueError("input length must be a multiple of eight bytes")             # <<<<<<<<<<<<<<
 * 
 *         cdef char * ptr
 */
  __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_s_input_length_must_be_a_multiple); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 3843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_cannot_be_converted); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_s_self__seg_ptrs_self_thisptr_self); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);

  /* "(tree fragment)":4
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._seg_ptrs,self.thisptr,self.views cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_s_self__seg_ptrs_self_thisptr_self); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__130 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_self_view_cannot_be); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "(tree fragment)":4
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.thisptr,self.view cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__131 = PyTuple_Pack(1, __pyx_kp_s_self_thisptr_self_view_cannot_be); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);

  /* "capnp/lib/capnp.pyx":4078
 * 
 *         if '_' in capnp_module_name:
 *             capnp_module_name_dashes = capnp_module_name.replace('_', '-')             # <<<<<<<<<<<<<<
 *             capnp_module_name_spaces = capnp_module_name.replace('_', ' ')
 *             has_underscores = True
 */
  __pyx_tuple__136 = PyTuple_Pack(2, __pyx_n_s__134, __pyx_kp_s__135); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);

  /* "capnp/lib/capnp.pyx":4079
 *         if '_' in capnp_module_name:
 *             capnp_module_name_dashes = capnp_module_name.replace('_', '-')
 *             capnp_module_name_spaces = capnp_module_name.replace('_', ' ')             # <<<<<<<<<<<<<<
 *             has_underscores = True
 * 
 */
  __pyx_tuple__138 = PyTuple_Pack(2, __pyx_n_s__134, __pyx_kp_s__137); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 4079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "capnp/lib/capnp.pyx":45
 * cdef dict _type_registry = {}
 * 
 * def register_type(id, klass):             # <<<<<<<<<<<<<<
 *     _type_registry[id] = klass
 * 
 */
  __pyx_tuple__141 = PyTuple_Pack(2, __pyx_n_s_id, __pyx_n_s_klass); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_register_type, 45, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 45, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":48
 *     _type_registry[id] = klass
 * 
 * def deregister_all_types():             # <<<<<<<<<<<<<<
 *     _type_registry = {}
 * 
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_n_s_type_registry); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_deregister_all_types, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 48, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":152
 *     String strException" ::kj::str"(capnp.Exception)
 * 
 * def _make_enum(enum_name, *sequential, **named):             # <<<<<<<<<<<<<<
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())
 */
  __pyx_tuple__145 = PyTuple_Pack(7, __pyx_n_s_enum_name, __pyx_n_s_sequential, __pyx_n_s_named, __pyx_n_s_enums, __pyx_n_s_reverse, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_make_enum, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 152, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":158
 *     return type(enum_name, (), enums)
 * 
 * _Type = _make_enum('_Type',             # <<<<<<<<<<<<<<
 *                     FAILED = 0,
 *                     OVERLOADED = 1,
 */
  __pyx_tuple__147 = PyTuple_Pack(1, __pyx_n_s_Type); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);

  /* "capnp/lib/capnp.pyx":197
 *     '''KjException is a wrapper of the internal C++ exception type. There is an enum named `Type` listed below, and a bunch of fields'''
 * 
 *     Type = _make_enum('Type', **{x : x for x in _Type.reverse_mapping.values()})             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, message=None, nature=None, durability=None, wrapper=None, type=None):
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_n_s_Type_2); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);

  /* "capnp/lib/capnp.pyx":199
 *     Type = _make_enum('Type', **{x : x for x in _Type.reverse_mapping.values()})
 * 
 *     def __init__(self, message=None, nature=None, durability=None, wrapper=None, type=None):             # <<<<<<<<<<<<<<
 *         if wrapper is not None:
 *             self.wrapper = wrapper
 */
  __pyx_tuple__149 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_nature, __pyx_n_s_durability, __pyx_n_s_wrapper, __pyx_n_s_type); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_init_3, 199, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 199, __pyx_L1_error)
  __pyx_tuple__151 = PyTuple_Pack(5, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);

  /* "capnp/lib/capnp.pyx":211
 * 
 *     @property
 *     def file(self):             # <<<<<<<<<<<<<<
 *         return self.wrapper.file
 *     @property
 */
  __pyx_tuple__152 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);
  __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_file, 211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 211, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":214
 *         return self.wrapper.file
 *     @property
 *     def line(self):             # <<<<<<<<<<<<<<
 *         return self.wrapper.line
 *     @property
 */
  __pyx_tuple__154 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_line, 214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 214, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":217
 *         return self.wrapper.line
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self.wrapper is not None:
 *             return self.wrapper.type
 */
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_type, 217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 217, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":223
 *             return self._type
 *     @property
 *     def description(self):             # <<<<<<<<<<<<<<
 *         if self.wrapper is not None:
 *             return self.wrapper.description
 */
  __pyx_tuple__158 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);
  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_description, 223, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 223, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":229
 *             return self.message
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 * 
 */
  __pyx_tuple__160 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_str_2, 229, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 229, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":232
 *         return self.message
 * 
 *     def _to_python(self):             # <<<<<<<<<<<<<<
 *         message = self.message
 *         if self.wrapper.type == 'FAILED':
 */
  __pyx_tuple__162 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);
  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_to_python, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 232, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":1007
 *     from pickle_helper import _struct_reducer
 * else:
 *     def _struct_reducer(schema_id, data):             # <<<<<<<<<<<<<<
 *         return _global_schema_parser.modules_by_id[schema_id].from_bytes(data)
 * 
 */
  __pyx_tuple__164 = PyTuple_Pack(2, __pyx_n_s_schema_id, __pyx_n_s_data); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 1007, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_struct_reducer, 1007, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 1007, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":1685
 *         return _VoidPromise()._init(self.thisptr.afterDelay(capnp.Nanoseconds(time)))
 * 
 * def getTimer():             # <<<<<<<<<<<<<<
 *     """
 *     Get libcapnp event loop timer
 */
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_getTimer, 1685, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 1685, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":1733
 *     create_event_loop(threaded)
 * 
 * def wait_forever():             # <<<<<<<<<<<<<<
 *     """
 *     Use libcapnp event loop to poll/wait forever
 */
  __pyx_tuple__167 = PyTuple_Pack(1, __pyx_n_s_loop); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_wait_forever, 1733, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 1733, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":1740
 *     helpers.waitNeverDone(deref(loop.thisptr).waitScope)
 * 
 * def poll_once():             # <<<<<<<<<<<<<<
 *     """
 *     Poll libcapnp event loop once
 */
  __pyx_tuple__169 = PyTuple_Pack(1, __pyx_n_s_loop); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_poll_once, 1740, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 1740, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2801
 *     cdef capnp.SchemaType thisptr
 * 
 * types = _ModuleType('capnp.types')             # <<<<<<<<<<<<<<
 * cdef _SchemaType _void = _SchemaType()
 * _void.thisptr = capnp.SchemaType(capnp.TypeWhichVOID)
 */
  __pyx_tuple__171 = PyTuple_Pack(1, __pyx_kp_s_capnp_types); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);

  /* "capnp/lib/capnp.pyx":2934
 * class _StructABCMeta(type):
 *     """A metaclass for the Type.Reader and Type.Builder ABCs."""
 *     def __instancecheck__(cls, obj):             # <<<<<<<<<<<<<<
 *         return isinstance(obj, cls.__base__) and obj.schema == cls._schema
 * 
 */
  __pyx_tuple__172 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 2934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);
  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_instancecheck, 2934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 2934, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2944
 *     return msg
 * 
 * class _StructModuleWhich(object):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_tuple__174 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 2944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);

  /* "capnp/lib/capnp.pyx":2947
 *     pass
 * 
 * class _StructModule(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, schema, name):
 *         self.schema = schema
 */
  __pyx_tuple__175 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 2947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);

  /* "capnp/lib/capnp.pyx":2948
 * 
 * class _StructModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 * 
 */
  __pyx_tuple__176 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_schema, __pyx_n_s_name, __pyx_n_s_field, __pyx_n_s_raw_field, __pyx_n_s_raw_schema, __pyx_n_s_field_schema, __pyx_n_s_sub_module, __pyx_n_s_union_field); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_init_3, 2948, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 2948, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":2967
 *                 setattr(self, name, sub_module)
 * 
 *     def read(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the unpacked object read from file.
 * 
 */
  __pyx_tuple__178 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_traversal_limit_in_words, __pyx_n_s_nesting_limit, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 2967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_read, 2967, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 2967, __pyx_L1_error)
  __pyx_tuple__180 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 2967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);

  /* "capnp/lib/capnp.pyx":2982
 *         reader = _StreamFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)
 *     def read_multiple(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */
  __pyx_tuple__181 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_traversal_limit_in_words, __pyx_n_s_nesting_limit, __pyx_n_s_skip_copy, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 2982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_read_multiple, 2982, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 2982, __pyx_L1_error)
  __pyx_tuple__183 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 2982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "capnp/lib/capnp.pyx":3000
 *         reader = _MultipleMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader
 *     def read_packed(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the packed object read from file.
 * 
 */
  __pyx_tuple__184 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_traversal_limit_in_words, __pyx_n_s_nesting_limit, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_read_packed, 3000, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __pyx_tuple__186 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);

  /* "capnp/lib/capnp.pyx":3015
 *         reader = _PackedFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)
 *     def read_multiple_packed(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */
  __pyx_tuple__187 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_traversal_limit_in_words, __pyx_n_s_nesting_limit, __pyx_n_s_skip_copy, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_read_multiple_packed, 3015, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __pyx_tuple__189 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);

  /* "capnp/lib/capnp.pyx":3033
 *         reader = _MultiplePackedMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader
 *     def read_multiple_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */
  __pyx_tuple__190 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_traversal_limit_in_words, __pyx_n_s_nesting_limit, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 3033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_read_multiple_bytes, 3033, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 3033, __pyx_L1_error)
  __pyx_tuple__192 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 3033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);

  /* "capnp/lib/capnp.pyx":3048
 *         reader = _MultipleBytesMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader
 *     def read_multiple_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */
  __pyx_tuple__193 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_traversal_limit_in_words, __pyx_n_s_nesting_limit, __pyx_n_s_reader); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 3048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_read_multiple_bytes_packed, 3048, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 3048, __pyx_L1_error)
  __pyx_tuple__195 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 3048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);

  /* "capnp/lib/capnp.pyx":3063
 *         reader = _MultipleBytesPackedMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader
 *     def from_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None, builder=False):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the unpacked object in buf.
 * 
 */
  __pyx_tuple__196 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_traversal_limit_in_words, __pyx_n_s_nesting_limit, __pyx_n_s_builder, __pyx_n_s_message); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_from_bytes, 3063, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __pyx_tuple__198 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);

  /* "capnp/lib/capnp.pyx":3087
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)
 *             return message.get_root(self.schema)
 *     def from_segments(self, segments, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for a list of segment bytes.
 * 
 */
  __pyx_tuple__199 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_segments, __pyx_n_s_traversal_limit_in_words, __pyx_n_s_nesting_limit, __pyx_n_s_message); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 3087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_from_segments, 3087, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 3087, __pyx_L1_error)
  __pyx_tuple__201 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 3087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);

  /* "capnp/lib/capnp.pyx":3098
 *         message = _SegmentArrayMessageReader(segments, traversal_limit_in_words, nesting_limit)
 *         return message.get_root(self.schema)
 *     def from_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the packed object in buf.
 * 
 */
  __pyx_tuple__202 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_buf, __pyx_n_s_traversal_limit_in_words, __pyx_n_s_nesting_limit); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 3098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);
  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_from_bytes_packed, 3098, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 3098, __pyx_L1_error)
  __pyx_tuple__204 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 3098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);

  /* "capnp/lib/capnp.pyx":3113
 *         """
 *         return _PackedMessageReaderBytes(buf, traversal_limit_in_words, nesting_limit).get_root(self.schema)
 *     def __call__(self, num_first_segment_words=None, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)
 *     def new_message(self, num_first_segment_words=None, **kwargs):
 */
  __pyx_tuple__205 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_num_first_segment_words, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 3113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_call, 3113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 3113, __pyx_L1_error)
  __pyx_tuple__207 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 3113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);

  /* "capnp/lib/capnp.pyx":3115
 *     def __call__(self, num_first_segment_words=None, **kwargs):
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)
 *     def new_message(self, num_first_segment_words=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """Returns a newly allocated builder message.
 * 
 */
  __pyx_tuple__208 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_num_first_segment_words, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 3115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_new_message, 3115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 3115, __pyx_L1_error)
  __pyx_tuple__210 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 3115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);

  /* "capnp/lib/capnp.pyx":3128
 *         return _new_message(self, kwargs, num_first_segment_words)
 * 
 * class _InterfaceModule(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, schema, name):
 *         def server_init(server_self):
 */
  __pyx_tuple__211 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 3128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);

  /* "capnp/lib/capnp.pyx":3129
 * 
 * class _InterfaceModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         def server_init(server_self):
 *             pass
 */
  __pyx_tuple__212 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_schema, __pyx_n_s_name, __pyx_n_s_server_init, __pyx_n_s_server_init); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 3129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);
  __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_init_3, 3129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 3129, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3135
 *         self.Server = type(name + '.Server', (_DynamicCapabilityServer,), {'__init__': server_init, 'schema':schema})
 * 
 *     def _new_client(self, server):             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityClient()._init_vals(self.schema, server)
 * 
 */
  __pyx_tuple__214 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_server); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 3135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);
  __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_new_client, 3135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 3135, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3138
 *         return _DynamicCapabilityClient()._init_vals(self.schema, server)
 * 
 *     def _new_server(self, server):             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityServer(self.schema, server)
 * 
 */
  __pyx_tuple__216 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_server); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 3138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);
  __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_new_server, 3138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(0, 3138, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3141
 *         return _DynamicCapabilityServer(self.schema, server)
 * 
 * class _EnumModule(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, schema, name):
 *         self.schema = schema
 */
  __pyx_tuple__218 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 3141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);

  /* "capnp/lib/capnp.pyx":3142
 * 
 * class _EnumModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 *         for name, val in schema.enumerants.items():
 */
  __pyx_tuple__219 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_schema, __pyx_n_s_name, __pyx_n_s_val); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 3142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_init_3, 3142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 3142, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3921
 *         PyBuffer_Release(&self.view)
 * 
 * def _message_to_packed_bytes(_MessageBuilder message):             # <<<<<<<<<<<<<<
 *     r, w = _os.pipe()
 * 
 */
  __pyx_tuple__221 = PyTuple_Pack(6, __pyx_n_s_message, __pyx_n_s_r, __pyx_n_s_w, __pyx_n_s_writer, __pyx_n_s_reader, __pyx_n_s_ret); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 3921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_message_to_packed_bytes, 3921, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 3921, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3936
 *     return ret
 * 
 * def _write_message_to_fd(int fd, _MessageBuilder message):             # <<<<<<<<<<<<<<
 *     """Serialize a Cap'n Proto message to a file descriptor
 * 
 */
  __pyx_tuple__223 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_n_s_message); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 3936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_write_message_to_fd, 3936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 3936, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3961
 *     schema_cpp.writeMessageToFd(fd, deref(message.thisptr))
 * 
 * def _write_packed_message_to_fd(int fd, _MessageBuilder message):             # <<<<<<<<<<<<<<
 *     """Serialize a Cap'n Proto message to a file descriptor in a packed manner
 * 
 */
  __pyx_tuple__225 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_n_s_message); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 3961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_write_packed_message_to_fd, 3961, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 3961, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3989
 * _global_schema_parser = None
 * 
 * def cleanup_global_schema_parser():             # <<<<<<<<<<<<<<
 *     """Unloads all of the schema from the current context"""
 *     global _global_schema_parser
 */
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_cleanup_global_schema_parser, 3989, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 3989, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3996
 *         _global_schema_parser = None
 * 
 * def load(file_name, display_name=None, imports=[]):             # <<<<<<<<<<<<<<
 *     """Load a Cap'n Proto schema from a file
 * 
 */
  __pyx_tuple__228 = PyTuple_Pack(3, __pyx_n_s_file_name, __pyx_n_s_display_name, __pyx_n_s_imports); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 3996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);
  __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_load_2, 3996, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(0, 3996, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4033
 * 
 * class _Loader:
 *     def __init__(self, fullname, path, additional_paths):             # <<<<<<<<<<<<<<
 *         self.fullname = fullname
 *         self.path = path
 */
  __pyx_tuple__230 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_fullname, __pyx_n_s_path, __pyx_n_s_additional_paths, __pyx_n_s_dir_name); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 4033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);
  __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_init_3, 4033, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 4033, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4044
 *         self.additional_paths = additional_paths
 * 
 *     def load_module(self, fullname):             # <<<<<<<<<<<<<<
 *         assert self.fullname == fullname, (
 *             "invalid module, expected %s, got %s" % (
 */
  __pyx_tuple__232 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_fullname, __pyx_n_s_imports, __pyx_n_s_module, __pyx_n_s_path); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 4044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);
  __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_load_module, 4044, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(0, 4044, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4057
 * 
 * class _Importer:
 *     def __init__(self, additional_paths):             # <<<<<<<<<<<<<<
 *         self.extension = '.capnp'
 *         self.additional_paths = additional_paths
 */
  __pyx_tuple__234 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_additional_paths); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);
  __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_init_3, 4057, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 4057, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4060
 *         self.extension = '.capnp'
 *         self.additional_paths = additional_paths
 *     def find_module(self, fullname, package_path=None):             # <<<<<<<<<<<<<<
 *         if fullname in _sys.modules: # Don't allow re-imports
 *             return None
 */
  __pyx_tuple__236 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_fullname, __pyx_n_s_package_path, __pyx_n_s_mod_parts, __pyx_n_s_module_name, __pyx_n_s_capnp_module_name, __pyx_n_s_has_underscores, __pyx_n_s_capnp_module_name_dashes, __pyx_n_s_capnp_module_name_spaces, __pyx_n_s_paths, __pyx_n_s_join_path, __pyx_n_s_is_file, __pyx_n_s_is_abs, __pyx_n_s_abspath, __pyx_n_s_sep, __pyx_n_s_path); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);
  __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(3, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_find_module, 4060, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __pyx_tuple__238 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);

  /* "capnp/lib/capnp.pyx":4110
 * _importer = None
 * 
 * def add_import_hook(additional_paths=[]):             # <<<<<<<<<<<<<<
 *     """Add a hook to the python import system, so that Cap'n Proto modules are directly importable
 * 
 */
  __pyx_tuple__239 = PyTuple_Pack(3, __pyx_n_s_additional_paths, __pyx_n_s_extra_paths, __pyx_n_s_path); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_add_import_hook, 4110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 4110, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4147
 *     _sys.meta_path.append(_importer)
 * 
 * def remove_import_hook():             # <<<<<<<<<<<<<<
 *     """Remove the import hook, and return python's import to normal"""
 *     global _importer
 */
  __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_remove_import_hook, 4147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(0, 4147, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4154
 *     _importer = None
 * 
 * def _init_capnp_api():             # <<<<<<<<<<<<<<
 *     """ Initialize static function pointers for cdef api functions. """
 *     init_capnp_api()
 */
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_capnp_lib_capnp_pyx, __pyx_n_s_init_capnp_api, 4154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 4154, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle__DynamicResizableListBuilder(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__243 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__DynamicResizable, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__245 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__DynamicEnumField, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__247 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__MessageSize, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__249 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__DynamicCapabilit, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_tuple__251 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle__MultipleBytesMes, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_0_01 = PyFloat_FromDouble(0.01); if (unlikely(!__pyx_float_0_01)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_77509169 = PyInt_FromLong(77509169L); if (unlikely(!__pyx_int_77509169)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_88241323 = PyInt_FromLong(88241323L); if (unlikely(!__pyx_int_88241323)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_182503194 = PyInt_FromLong(182503194L); if (unlikely(!__pyx_int_182503194)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_220006191 = PyInt_FromLong(220006191L); if (unlikely(!__pyx_int_220006191)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_224926043 = PyInt_FromLong(224926043L); if (unlikely(!__pyx_int_224926043)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_8 = PyInt_FromLong(-8); if (unlikely(!__pyx_int_neg_8)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_5capnp_3lib_5capnp__type_registry = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp_C_DEFAULT_EVENT_LOOP = ((struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__void = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__bool = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__int8 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__int16 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__int32 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__int64 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__uint8 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__uint16 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__uint32 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__uint64 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__float32 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__float64 = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__text = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__data = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_v_5capnp_3lib_5capnp__any_pointer = ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)Py_None); Py_INCREF(Py_None);
  __pyx_8genexpr2__pyx_v_5capnp_3lib_5capnp_11KjException_x = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("to_python_reader", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_to_python_reader, "PyObject *( ::capnp::DynamicValue::Reader, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("to_python_builder", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_to_python_builder, "PyObject *( ::capnp::DynamicValue::Builder, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_to_dict", (void (*)(void))__pyx_f_5capnp_3lib_5capnp__to_dict, "PyObject *(PyObject *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_from_list", (void (*)(void))__pyx_f_5capnp_3lib_5capnp__from_list, "PyObject *(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_from_tuple", (void (*)(void))__pyx_f_5capnp_3lib_5capnp__from_tuple, "PyObject *(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_setDynamicFieldWithField", (void (*)(void))__pyx_f_5capnp_3lib_5capnp__setDynamicFieldWithField, "PyObject *( ::capnp::DynamicStruct::Builder, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, PyObject *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_setDynamicFieldStatic", (void (*)(void))__pyx_f_5capnp_3lib_5capnp__setDynamicFieldStatic, "PyObject *( ::capnp::DynamicStruct::Builder, PyObject *, PyObject *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("wrap_dynamic_struct_reader", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_wrap_dynamic_struct_reader, "PyObject *( ::capnp::Response< ::capnp::DynamicStruct> &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("wrap_remote_call", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_wrap_remote_call, "PyObject *(PyObject *,  ::capnp::Response< ::capnp::DynamicStruct> &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("call_server_method", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_call_server_method, " ::kj::Promise<void>  *(PyObject *, char *,  ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct> &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("convert_array_pyobject", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_convert_array_pyobject, "PyObject *( ::kj::Array<PyObject *> &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("extract_promise", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_extract_promise, " ::kj::Promise<PyObject *>  *(PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("extract_remote_promise", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_extract_remote_promise, " ::capnp::RemotePromise< ::capnp::DynamicStruct> *(PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("wrap_kj_exception", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_wrap_kj_exception, "PyObject *( ::kj::Exception &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("wrap_kj_exception_for_reraise", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_wrap_kj_exception_for_reraise, "PyObject *( ::kj::Exception &)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("get_exception_info", (void (*)(void))__pyx_f_5capnp_3lib_5capnp_get_exception_info, "PyObject *(PyObject *, PyObject *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_5capnp_3lib_5capnp__StructSchemaField = &__pyx_vtable_5capnp_3lib_5capnp__StructSchemaField;
  __pyx_vtable_5capnp_3lib_5capnp__StructSchemaField._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *,  ::capnp::StructSchema::Field, struct __pyx_opt_args_5capnp_3lib_5capnp_18_StructSchemaField__init *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_18_StructSchemaField__init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__StructSchemaField) < 0) __PYX_ERR(0, 2663, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__StructSchemaField.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__StructSchemaField.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__StructSchemaField.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__StructSchemaField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__StructSchemaField.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__StructSchemaField) < 0) __PYX_ERR(0, 2663, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StructSchemaField, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__StructSchemaField) < 0) __PYX_ERR(0, 2663, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__StructSchemaField) < 0) __PYX_ERR(0, 2663, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__StructSchemaField = &__pyx_type_5capnp_3lib_5capnp__StructSchemaField;
  __pyx_vtabptr_5capnp_3lib_5capnp__StringArrayPtr = &__pyx_vtable_5capnp_3lib_5capnp__StringArrayPtr;
  __pyx_vtable_5capnp_3lib_5capnp__StringArrayPtr.asArrayPtr = ( ::kj::ArrayPtr< ::kj::StringPtr>  (*)(struct __pyx_obj_5capnp_3lib_5capnp__StringArrayPtr *))__pyx_f_5capnp_3lib_5capnp_15_StringArrayPtr_asArrayPtr;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__StringArrayPtr) < 0) __PYX_ERR(0, 3147, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__StringArrayPtr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__StringArrayPtr.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__StringArrayPtr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__StringArrayPtr.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__StringArrayPtr.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__StringArrayPtr) < 0) __PYX_ERR(0, 3147, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StringArrayPtr, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__StringArrayPtr) < 0) __PYX_ERR(0, 3147, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__StringArrayPtr) < 0) __PYX_ERR(0, 3147, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__StringArrayPtr = &__pyx_type_5capnp_3lib_5capnp__StringArrayPtr;
  __pyx_vtabptr_5capnp_3lib_5capnp_SchemaParser = &__pyx_vtable_5capnp_3lib_5capnp_SchemaParser;
  __pyx_vtable_5capnp_3lib_5capnp_SchemaParser._parse_disk_file = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp_SchemaParser *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_12SchemaParser__parse_disk_file;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp_SchemaParser) < 0) __PYX_ERR(0, 3160, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp_SchemaParser.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp_SchemaParser.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp_SchemaParser.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp_SchemaParser.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp_SchemaParser.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp_SchemaParser) < 0) __PYX_ERR(0, 3160, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SchemaParser, (PyObject *)&__pyx_type_5capnp_3lib_5capnp_SchemaParser) < 0) __PYX_ERR(0, 3160, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp_SchemaParser) < 0) __PYX_ERR(0, 3160, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp_SchemaParser = &__pyx_type_5capnp_3lib_5capnp_SchemaParser;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicOrphan = &__pyx_vtable_5capnp_3lib_5capnp__DynamicOrphan;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicOrphan._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *,  ::capnp::Orphan< ::capnp::DynamicValue>, PyObject *))__pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicOrphan.move = ( ::capnp::Orphan< ::capnp::DynamicValue> (*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *))__pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan_move;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicOrphan.get = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14_DynamicOrphan_get;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicOrphan) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicOrphan.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__DynamicOrphan.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__DynamicOrphan.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__DynamicOrphan.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicOrphan.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicOrphan) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicOrphan, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicOrphan) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicOrphan) < 0) __PYX_ERR(0, 1509, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicOrphan = &__pyx_type_5capnp_3lib_5capnp__DynamicOrphan;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructReader = &__pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *,  ::capnp::DynamicStruct::Reader, PyObject *, struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader__init *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader._get = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__get;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader._has = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__has;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader._which = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__which;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader._which_str = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__which_str;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader._get_by_field = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__get_by_field;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader._has_by_field = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader__has_by_field;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructReader.as_builder = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructReader *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_20_DynamicStructReader_as_builder;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicStructReader) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicStructReader.tp_print = 0;
  #endif
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicStructReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructReader) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicStructReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicStructReader) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader = &__pyx_type_5capnp_3lib_5capnp__DynamicStructReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructBuilder = &__pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *,  ::capnp::DynamicStruct::Builder, PyObject *, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._check_write = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__check_write;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder.to_bytes = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_bytes;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder.to_segments = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_segments;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._to_bytes_packed_helper = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__to_bytes_packed_helper;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder.to_bytes_packed = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_to_bytes_packed;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._get = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__get;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._set = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__set;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._has = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__has;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder.init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_init *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._get_by_field = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__get_by_field;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._set_by_field = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__set_by_field;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._has_by_field = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__has_by_field;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._init_by_field = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, struct __pyx_obj_5capnp_3lib_5capnp__StructSchemaField *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__init_by_field;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder.init_resizable_list = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_init_resizable_list;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._which = (struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__which;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder._which_str = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder__which_str;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder.adopt = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_adopt;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder.disown = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_disown;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder.as_reader = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_as_reader;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructBuilder.copy = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructBuilder *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_21_DynamicStructBuilder_copy;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicStructBuilder) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicStructBuilder.tp_print = 0;
  #endif
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicStructBuilder.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructBuilder) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicStructBuilder, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicStructBuilder) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder = &__pyx_type_5capnp_3lib_5capnp__DynamicStructBuilder;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicEnumField = &__pyx_vtable_5capnp_3lib_5capnp__DynamicEnumField;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicEnumField._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *, PyObject *))__pyx_f_5capnp_3lib_5capnp_17_DynamicEnumField__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicEnumField._str = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnumField *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_17_DynamicEnumField__str;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicEnumField) < 0) __PYX_ERR(0, 955, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicEnumField.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__DynamicEnumField.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__DynamicEnumField.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__DynamicEnumField.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicEnumField.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicEnumField) < 0) __PYX_ERR(0, 955, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicEnumField, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicEnumField) < 0) __PYX_ERR(0, 955, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicEnumField) < 0) __PYX_ERR(0, 955, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicEnumField = &__pyx_type_5capnp_3lib_5capnp__DynamicEnumField;
  __pyx_vtabptr_5capnp_3lib_5capnp__Schema = &__pyx_vtable_5capnp_3lib_5capnp__Schema;
  __pyx_vtable_5capnp_3lib_5capnp__Schema._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *,  ::capnp::Schema))__pyx_f_5capnp_3lib_5capnp_7_Schema__init;
  __pyx_vtable_5capnp_3lib_5capnp__Schema.as_const_value = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_7_Schema_as_const_value;
  __pyx_vtable_5capnp_3lib_5capnp__Schema.as_struct = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_7_Schema_as_struct;
  __pyx_vtable_5capnp_3lib_5capnp__Schema.as_interface = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_7_Schema_as_interface;
  __pyx_vtable_5capnp_3lib_5capnp__Schema.as_enum = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_7_Schema_as_enum;
  __pyx_vtable_5capnp_3lib_5capnp__Schema.get_proto = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Schema *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_7_Schema_get_proto;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__Schema) < 0) __PYX_ERR(0, 2540, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__Schema.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__Schema.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__Schema.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__Schema.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__Schema.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__Schema) < 0) __PYX_ERR(0, 2540, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Schema, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__Schema) < 0) __PYX_ERR(0, 2540, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__Schema) < 0) __PYX_ERR(0, 2540, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__Schema = &__pyx_type_5capnp_3lib_5capnp__Schema;
  __pyx_vtabptr_5capnp_3lib_5capnp__InterfaceSchema = &__pyx_vtable_5capnp_3lib_5capnp__InterfaceSchema;
  __pyx_vtable_5capnp_3lib_5capnp__InterfaceSchema._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceSchema *,  ::capnp::InterfaceSchema))__pyx_f_5capnp_3lib_5capnp_16_InterfaceSchema__init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__InterfaceSchema) < 0) __PYX_ERR(0, 2701, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__InterfaceSchema.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__InterfaceSchema.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__InterfaceSchema.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__InterfaceSchema.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__InterfaceSchema.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__InterfaceSchema) < 0) __PYX_ERR(0, 2701, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_InterfaceSchema, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__InterfaceSchema) < 0) __PYX_ERR(0, 2701, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__InterfaceSchema) < 0) __PYX_ERR(0, 2701, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__InterfaceSchema = &__pyx_type_5capnp_3lib_5capnp__InterfaceSchema;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicEnum = &__pyx_vtable_5capnp_3lib_5capnp__DynamicEnum;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicEnum._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *,  ::capnp::DynamicEnum, PyObject *))__pyx_f_5capnp_3lib_5capnp_12_DynamicEnum__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicEnum._as_str = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicEnum *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_12_DynamicEnum__as_str;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicEnum) < 0) __PYX_ERR(0, 912, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicEnum.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__DynamicEnum.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__DynamicEnum.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__DynamicEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicEnum.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicEnum) < 0) __PYX_ERR(0, 912, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicEnum, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicEnum) < 0) __PYX_ERR(0, 912, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicEnum) < 0) __PYX_ERR(0, 912, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicEnum = &__pyx_type_5capnp_3lib_5capnp__DynamicEnum;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicListBuilder = &__pyx_vtable_5capnp_3lib_5capnp__DynamicListBuilder;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicListBuilder._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *,  ::capnp::DynamicList::Builder, PyObject *))__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicListBuilder._get = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, int64_t, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__get;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicListBuilder._set = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder__set;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicListBuilder.adopt = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *, struct __pyx_obj_5capnp_3lib_5capnp__DynamicOrphan *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_adopt;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicListBuilder.disown = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_disown;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicListBuilder.init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListBuilder *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_19_DynamicListBuilder_init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicListBuilder) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicListBuilder.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__DynamicListBuilder.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__DynamicListBuilder.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__DynamicListBuilder.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicListBuilder.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicListBuilder) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicListBuilder, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicListBuilder) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicListBuilder) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicListBuilder = &__pyx_type_5capnp_3lib_5capnp__DynamicListBuilder;
  __pyx_vtabptr_5capnp_3lib_5capnp__MessageBuilder = &__pyx_vtable_5capnp_3lib_5capnp__MessageBuilder;
  __pyx_vtable_5capnp_3lib_5capnp__MessageBuilder.init_root = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_init_root;
  __pyx_vtable_5capnp_3lib_5capnp__MessageBuilder.get_root = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_root;
  __pyx_vtable_5capnp_3lib_5capnp__MessageBuilder.get_root_as_any = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_root_as_any;
  __pyx_vtable_5capnp_3lib_5capnp__MessageBuilder.set_root = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_set_root;
  __pyx_vtable_5capnp_3lib_5capnp__MessageBuilder.get_segments_for_output = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_get_segments_for_output;
  __pyx_vtable_5capnp_3lib_5capnp__MessageBuilder.new_orphan = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__MessageBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_15_MessageBuilder_new_orphan;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__MessageBuilder) < 0) __PYX_ERR(0, 3303, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__MessageBuilder.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__MessageBuilder.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__MessageBuilder.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__MessageBuilder.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__MessageBuilder.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__MessageBuilder) < 0) __PYX_ERR(0, 3303, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MessageBuilder, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__MessageBuilder) < 0) __PYX_ERR(0, 3303, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__MessageBuilder) < 0) __PYX_ERR(0, 3303, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder = &__pyx_type_5capnp_3lib_5capnp__MessageBuilder;
  __pyx_vtabptr_5capnp_3lib_5capnp__KjExceptionWrapper = &__pyx_vtable_5capnp_3lib_5capnp__KjExceptionWrapper;
  __pyx_vtable_5capnp_3lib_5capnp__KjExceptionWrapper._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__KjExceptionWrapper *,  ::kj::Exception &))__pyx_f_5capnp_3lib_5capnp_19_KjExceptionWrapper__init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__KjExceptionWrapper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_KjExceptionWrapper, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__KjExceptionWrapper = &__pyx_type_5capnp_3lib_5capnp__KjExceptionWrapper;
  __pyx_vtabptr_5capnp_3lib_5capnp__NodeReader = &__pyx_vtable_5capnp_3lib_5capnp__NodeReader;
  __pyx_vtable_5capnp_3lib_5capnp__NodeReader.init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__NodeReader *,  ::capnp::schema::Node::Reader))__pyx_f_5capnp_3lib_5capnp_11_NodeReader_init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__NodeReader) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__NodeReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__NodeReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__NodeReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__NodeReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__NodeReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__NodeReader) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NodeReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__NodeReader) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__NodeReader) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__NodeReader = &__pyx_type_5capnp_3lib_5capnp__NodeReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__NestedNodeReader = &__pyx_vtable_5capnp_3lib_5capnp__NestedNodeReader;
  __pyx_vtable_5capnp_3lib_5capnp__NestedNodeReader.init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__NestedNodeReader *,  ::capnp::schema::Node::NestedNode::Reader))__pyx_f_5capnp_3lib_5capnp_17_NestedNodeReader_init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__NestedNodeReader) < 0) __PYX_ERR(0, 345, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__NestedNodeReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__NestedNodeReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__NestedNodeReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__NestedNodeReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__NestedNodeReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__NestedNodeReader) < 0) __PYX_ERR(0, 345, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NestedNodeReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__NestedNodeReader) < 0) __PYX_ERR(0, 345, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__NestedNodeReader) < 0) __PYX_ERR(0, 345, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__NestedNodeReader = &__pyx_type_5capnp_3lib_5capnp__NestedNodeReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicListReader = &__pyx_vtable_5capnp_3lib_5capnp__DynamicListReader;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicListReader._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *,  ::capnp::DynamicList::Reader, PyObject *))__pyx_f_5capnp_3lib_5capnp_18_DynamicListReader__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicListReader._get = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicListReader *, int64_t, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_18_DynamicListReader__get;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicListReader) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicListReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__DynamicListReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__DynamicListReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__DynamicListReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicListReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicListReader) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicListReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicListReader) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicListReader) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicListReader = &__pyx_type_5capnp_3lib_5capnp__DynamicListReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicResizableListBuilder = &__pyx_vtable_5capnp_3lib_5capnp__DynamicResizableListBuilder;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicResizableListBuilder.add = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_28_DynamicResizableListBuilder_add;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicResizableListBuilder._get = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicResizableListBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_28_DynamicResizableListBuilder__get;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicResizableListBuilder) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicResizableListBuilder, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicResizableListBuilder = &__pyx_type_5capnp_3lib_5capnp__DynamicResizableListBuilder;
  __pyx_vtabptr_5capnp_3lib_5capnp__List_NestedNode_Reader = &__pyx_vtable_5capnp_3lib_5capnp__List_NestedNode_Reader;
  __pyx_vtable_5capnp_3lib_5capnp__List_NestedNode_Reader._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__List_NestedNode_Reader *,  ::capnp::List< ::capnp::schema::Node::NestedNode> ::Reader))__pyx_f_5capnp_3lib_5capnp_23_List_NestedNode_Reader__init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__List_NestedNode_Reader) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_List_NestedNode_Reader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__List_NestedNode_Reader = &__pyx_type_5capnp_3lib_5capnp__List_NestedNode_Reader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__MessageSize) < 0) __PYX_ERR(0, 996, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__MessageSize.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__MessageSize.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__MessageSize.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__MessageSize.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MessageSize, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__MessageSize) < 0) __PYX_ERR(0, 996, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__MessageSize) < 0) __PYX_ERR(0, 996, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__MessageSize = &__pyx_type_5capnp_3lib_5capnp__MessageSize;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructPipeline = &__pyx_vtable_5capnp_3lib_5capnp__DynamicStructPipeline;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructPipeline._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *,  ::capnp::DynamicStruct::Pipeline *, PyObject *))__pyx_f_5capnp_3lib_5capnp_22_DynamicStructPipeline__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicStructPipeline._get = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicStructPipeline *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_22_DynamicStructPipeline__get;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicStructPipeline) < 0) __PYX_ERR(0, 1459, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicStructPipeline.tp_print = 0;
  #endif
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicStructPipeline.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructPipeline) < 0) __PYX_ERR(0, 1459, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicStructPipeline, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicStructPipeline) < 0) __PYX_ERR(0, 1459, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicStructPipeline) < 0) __PYX_ERR(0, 1459, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicStructPipeline = &__pyx_type_5capnp_3lib_5capnp__DynamicStructPipeline;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicObjectReader = &__pyx_vtable_5capnp_3lib_5capnp__DynamicObjectReader;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectReader._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *,  ::capnp::AnyPointer::Reader, PyObject *))__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectReader.as_struct = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_struct;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectReader.as_interface = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_interface;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectReader.as_list = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_list;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectReader.as_text = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectReader *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20_DynamicObjectReader_as_text;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicObjectReader) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicObjectReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__DynamicObjectReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__DynamicObjectReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__DynamicObjectReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicObjectReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicObjectReader) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicObjectReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicObjectReader) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicObjectReader) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectReader = &__pyx_type_5capnp_3lib_5capnp__DynamicObjectReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicObjectBuilder = &__pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *,  ::capnp::AnyPointer::Builder, PyObject *))__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder.as_struct = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_struct;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder.as_interface = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_interface;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder.as_list = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_list;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder.set = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_set;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder.set_as_text = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_set_as_text;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder.init_as_list = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_init_as_list;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder.as_text = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_text;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicObjectBuilder.as_reader = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicObjectBuilder *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_21_DynamicObjectBuilder_as_reader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder) < 0) __PYX_ERR(0, 1570, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicObjectBuilder) < 0) __PYX_ERR(0, 1570, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicObjectBuilder, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder) < 0) __PYX_ERR(0, 1570, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder) < 0) __PYX_ERR(0, 1570, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicObjectBuilder = &__pyx_type_5capnp_3lib_5capnp__DynamicObjectBuilder;
  __pyx_vtabptr_5capnp_3lib_5capnp__EventLoop = &__pyx_vtable_5capnp_3lib_5capnp__EventLoop;
  __pyx_vtable_5capnp_3lib_5capnp__EventLoop._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *))__pyx_f_5capnp_3lib_5capnp_10_EventLoop__init;
  __pyx_vtable_5capnp_3lib_5capnp__EventLoop._remove = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_10_EventLoop__remove;
  __pyx_vtable_5capnp_3lib_5capnp__EventLoop.makeTwoWayPipe = ( ::kj::TwoWayPipe (*)(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *))__pyx_f_5capnp_3lib_5capnp_10_EventLoop_makeTwoWayPipe;
  __pyx_vtable_5capnp_3lib_5capnp__EventLoop.wrapSocketFd = ( ::kj::Own< ::kj::AsyncIoStream>  (*)(struct __pyx_obj_5capnp_3lib_5capnp__EventLoop *, int))__pyx_f_5capnp_3lib_5capnp_10_EventLoop_wrapSocketFd;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__EventLoop) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__EventLoop.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__EventLoop.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__EventLoop.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__EventLoop.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__EventLoop.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__EventLoop) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EventLoop, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__EventLoop) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__EventLoop) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__EventLoop = &__pyx_type_5capnp_3lib_5capnp__EventLoop;
  __pyx_vtabptr_5capnp_3lib_5capnp__Timer = &__pyx_vtable_5capnp_3lib_5capnp__Timer;
  __pyx_vtable_5capnp_3lib_5capnp__Timer._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Timer *,  ::kj::Timer *))__pyx_f_5capnp_3lib_5capnp_6_Timer__init;
  __pyx_vtable_5capnp_3lib_5capnp__Timer.after_delay = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Timer *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_6_Timer_after_delay;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__Timer) < 0) __PYX_ERR(0, 1675, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__Timer.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__Timer.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__Timer.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__Timer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__Timer.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__Timer) < 0) __PYX_ERR(0, 1675, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Timer, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__Timer) < 0) __PYX_ERR(0, 1675, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__Timer) < 0) __PYX_ERR(0, 1675, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__Timer = &__pyx_type_5capnp_3lib_5capnp__Timer;
  __pyx_vtabptr_5capnp_3lib_5capnp__CallContext = &__pyx_vtable_5capnp_3lib_5capnp__CallContext;
  __pyx_vtable_5capnp_3lib_5capnp__CallContext._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *,  ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct>))__pyx_f_5capnp_3lib_5capnp_12_CallContext__init;
  __pyx_vtable_5capnp_3lib_5capnp__CallContext._get_results = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_CallContext__get_results *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_12_CallContext__get_results;
  __pyx_vtable_5capnp_3lib_5capnp__CallContext.release_params = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_12_CallContext_release_params;
  __pyx_vtable_5capnp_3lib_5capnp__CallContext.allow_cancellation = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_12_CallContext_allow_cancellation;
  __pyx_vtable_5capnp_3lib_5capnp__CallContext.tail_call = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__CallContext *, struct __pyx_obj_5capnp_3lib_5capnp__Request *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_12_CallContext_tail_call;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__CallContext) < 0) __PYX_ERR(0, 1747, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__CallContext.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__CallContext.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__CallContext.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__CallContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__CallContext.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__CallContext) < 0) __PYX_ERR(0, 1747, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CallContext, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__CallContext) < 0) __PYX_ERR(0, 1747, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__CallContext) < 0) __PYX_ERR(0, 1747, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__CallContext = &__pyx_type_5capnp_3lib_5capnp__CallContext;
  __pyx_vtabptr_5capnp_3lib_5capnp__Promise = &__pyx_vtable_5capnp_3lib_5capnp__Promise;
  __pyx_vtable_5capnp_3lib_5capnp__Promise._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Promise *, __pyx_t_5capnp_8includes_9capnp_cpp_PyPromise, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise__init *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_8_Promise__init;
  __pyx_vtable_5capnp_3lib_5capnp__Promise.wait = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Promise *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_8_Promise_wait;
  __pyx_vtable_5capnp_3lib_5capnp__Promise.then = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Promise *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_then *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_8_Promise_then;
  __pyx_vtable_5capnp_3lib_5capnp__Promise.cancel = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Promise *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_8_Promise_cancel *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_8_Promise_cancel;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__Promise) < 0) __PYX_ERR(0, 1779, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__Promise.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__Promise.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__Promise.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__Promise.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__Promise.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__Promise) < 0) __PYX_ERR(0, 1779, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Promise, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__Promise) < 0) __PYX_ERR(0, 1779, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__Promise) < 0) __PYX_ERR(0, 1779, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__Promise = &__pyx_type_5capnp_3lib_5capnp__Promise;
  __pyx_vtabptr_5capnp_3lib_5capnp__VoidPromise = &__pyx_vtable_5capnp_3lib_5capnp__VoidPromise;
  __pyx_vtable_5capnp_3lib_5capnp__VoidPromise._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, __pyx_t_5capnp_8includes_9capnp_cpp_VoidPromise, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise__init *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_12_VoidPromise__init;
  __pyx_vtable_5capnp_3lib_5capnp__VoidPromise.wait = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_wait;
  __pyx_vtable_5capnp_3lib_5capnp__VoidPromise.then = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_then *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_then;
  __pyx_vtable_5capnp_3lib_5capnp__VoidPromise.as_pypromise = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_as_pypromise;
  __pyx_vtable_5capnp_3lib_5capnp__VoidPromise.cancel = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__VoidPromise *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_12_VoidPromise_cancel *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_12_VoidPromise_cancel;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__VoidPromise) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__VoidPromise.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__VoidPromise.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__VoidPromise.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__VoidPromise.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__VoidPromise.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__VoidPromise) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_VoidPromise, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__VoidPromise) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__VoidPromise) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__VoidPromise = &__pyx_type_5capnp_3lib_5capnp__VoidPromise;
  __pyx_vtabptr_5capnp_3lib_5capnp__RemotePromise = &__pyx_vtable_5capnp_3lib_5capnp__RemotePromise;
  __pyx_vtable_5capnp_3lib_5capnp__RemotePromise._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *,  ::capnp::RemotePromise< ::capnp::DynamicStruct>, PyObject *))__pyx_f_5capnp_3lib_5capnp_14_RemotePromise__init;
  __pyx_vtable_5capnp_3lib_5capnp__RemotePromise._wait = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14_RemotePromise__wait;
  __pyx_vtable_5capnp_3lib_5capnp__RemotePromise.as_pypromise = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14_RemotePromise_as_pypromise;
  __pyx_vtable_5capnp_3lib_5capnp__RemotePromise.then = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_then *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_14_RemotePromise_then;
  __pyx_vtable_5capnp_3lib_5capnp__RemotePromise._get = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14_RemotePromise__get;
  __pyx_vtable_5capnp_3lib_5capnp__RemotePromise.cancel = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__RemotePromise *, int __pyx_skip_dispatch, struct __pyx_opt_args_5capnp_3lib_5capnp_14_RemotePromise_cancel *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_14_RemotePromise_cancel;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__RemotePromise) < 0) __PYX_ERR(0, 1919, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__RemotePromise.tp_print = 0;
  #endif
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__RemotePromise.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__RemotePromise) < 0) __PYX_ERR(0, 1919, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RemotePromise, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__RemotePromise) < 0) __PYX_ERR(0, 1919, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__RemotePromise) < 0) __PYX_ERR(0, 1919, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__RemotePromise = &__pyx_type_5capnp_3lib_5capnp__RemotePromise;
  __pyx_vtabptr_5capnp_3lib_5capnp__Request = &__pyx_vtable_5capnp_3lib_5capnp__Request;
  __pyx_vtable_5capnp_3lib_5capnp__Request.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructBuilder;
  __pyx_vtable_5capnp_3lib_5capnp__Request._init_child = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Request *,  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct>, PyObject *))__pyx_f_5capnp_3lib_5capnp_8_Request__init_child;
  __pyx_vtable_5capnp_3lib_5capnp__Request.send = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Request *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_8_Request_send;
  __pyx_type_5capnp_3lib_5capnp__Request.tp_base = __pyx_ptype_5capnp_3lib_5capnp__DynamicStructBuilder;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__Request) < 0) __PYX_ERR(0, 2056, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__Request.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__Request.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__Request.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__Request.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__Request.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__Request) < 0) __PYX_ERR(0, 2056, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Request, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__Request) < 0) __PYX_ERR(0, 2056, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__Request = &__pyx_type_5capnp_3lib_5capnp__Request;
  __pyx_vtabptr_5capnp_3lib_5capnp__Response = &__pyx_vtable_5capnp_3lib_5capnp__Response;
  __pyx_vtable_5capnp_3lib_5capnp__Response.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__DynamicStructReader;
  __pyx_vtable_5capnp_3lib_5capnp__Response._init_child = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Response *,  ::capnp::Response< ::capnp::DynamicStruct>, PyObject *))__pyx_f_5capnp_3lib_5capnp_9_Response__init_child;
  __pyx_vtable_5capnp_3lib_5capnp__Response._init_childptr = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__Response *,  ::capnp::Response< ::capnp::DynamicStruct> *, PyObject *))__pyx_f_5capnp_3lib_5capnp_9_Response__init_childptr;
  __pyx_type_5capnp_3lib_5capnp__Response.tp_base = __pyx_ptype_5capnp_3lib_5capnp__DynamicStructReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__Response) < 0) __PYX_ERR(0, 2075, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__Response.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__Response.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__Response.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__Response.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__Response.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__Response) < 0) __PYX_ERR(0, 2075, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Response, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__Response) < 0) __PYX_ERR(0, 2075, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__Response = &__pyx_type_5capnp_3lib_5capnp__Response;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicCapabilityServer) < 0) __PYX_ERR(0, 2091, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicCapabilityServer.tp_print = 0;
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicCapabilityServer, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicCapabilityServer) < 0) __PYX_ERR(0, 2091, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicCapabilityServer) < 0) __PYX_ERR(0, 2091, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityServer = &__pyx_type_5capnp_3lib_5capnp__DynamicCapabilityServer;
  __pyx_vtabptr_5capnp_3lib_5capnp__DynamicCapabilityClient = &__pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *,  ::capnp::DynamicCapability::Client, PyObject *))__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__init;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient._init_vals = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, PyObject *))__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__init_vals;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient._find_method_args = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__find_method_args;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient._set_fields = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *,  ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct> *, PyObject *, PyObject *, PyObject *))__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__set_fields;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient._send_helper = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__send_helper;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient._request_helper = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient__request_helper;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient.upcast = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient_upcast;
  __pyx_vtable_5capnp_3lib_5capnp__DynamicCapabilityClient.cast_as = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__DynamicCapabilityClient *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_24_DynamicCapabilityClient_cast_as;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__DynamicCapabilityClient) < 0) __PYX_ERR(0, 2111, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__DynamicCapabilityClient.tp_print = 0;
  #endif
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__DynamicCapabilityClient.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__DynamicCapabilityClient) < 0) __PYX_ERR(0, 2111, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DynamicCapabilityClient, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__DynamicCapabilityClient) < 0) __PYX_ERR(0, 2111, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__DynamicCapabilityClient) < 0) __PYX_ERR(0, 2111, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__DynamicCapabilityClient = &__pyx_type_5capnp_3lib_5capnp__DynamicCapabilityClient;
  __pyx_vtabptr_5capnp_3lib_5capnp__CapabilityClient = &__pyx_vtable_5capnp_3lib_5capnp__CapabilityClient;
  __pyx_vtable_5capnp_3lib_5capnp__CapabilityClient._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *,  ::capnp::Capability::Client, PyObject *))__pyx_f_5capnp_3lib_5capnp_17_CapabilityClient__init;
  __pyx_vtable_5capnp_3lib_5capnp__CapabilityClient.cast_as = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__CapabilityClient *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_17_CapabilityClient_cast_as;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__CapabilityClient) < 0) __PYX_ERR(0, 2220, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__CapabilityClient.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__CapabilityClient.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__CapabilityClient.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__CapabilityClient.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__CapabilityClient.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__CapabilityClient) < 0) __PYX_ERR(0, 2220, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CapabilityClient, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__CapabilityClient) < 0) __PYX_ERR(0, 2220, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__CapabilityClient) < 0) __PYX_ERR(0, 2220, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__CapabilityClient = &__pyx_type_5capnp_3lib_5capnp__CapabilityClient;
  __pyx_vtabptr_5capnp_3lib_5capnp__TwoPartyVatNetwork = &__pyx_vtable_5capnp_3lib_5capnp__TwoPartyVatNetwork;
  __pyx_vtable_5capnp_3lib_5capnp__TwoPartyVatNetwork._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *, struct __pyx_obj_5capnp_3lib_5capnp__AsyncIoStream *,  ::capnp::rpc::twoparty::Side,  ::capnp::ReaderOptions))__pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork__init;
  __pyx_vtable_5capnp_3lib_5capnp__TwoPartyVatNetwork._init_pipe = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *, struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *,  ::capnp::rpc::twoparty::Side,  ::capnp::ReaderOptions))__pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork__init_pipe;
  __pyx_vtable_5capnp_3lib_5capnp__TwoPartyVatNetwork.on_disconnect = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__TwoPartyVatNetwork *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_19_TwoPartyVatNetwork_on_disconnect;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork) < 0) __PYX_ERR(0, 2240, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__TwoPartyVatNetwork) < 0) __PYX_ERR(0, 2240, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TwoPartyVatNetwork, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork) < 0) __PYX_ERR(0, 2240, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork) < 0) __PYX_ERR(0, 2240, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__TwoPartyVatNetwork = &__pyx_type_5capnp_3lib_5capnp__TwoPartyVatNetwork;
  __pyx_vtabptr_5capnp_3lib_5capnp_TwoPartyClient = &__pyx_vtable_5capnp_3lib_5capnp_TwoPartyClient;
  __pyx_vtable_5capnp_3lib_5capnp_TwoPartyClient._connect = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14TwoPartyClient__connect;
  __pyx_vtable_5capnp_3lib_5capnp_TwoPartyClient.bootstrap = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14TwoPartyClient_bootstrap;
  __pyx_vtable_5capnp_3lib_5capnp_TwoPartyClient.on_disconnect = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyClient *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14TwoPartyClient_on_disconnect;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp_TwoPartyClient) < 0) __PYX_ERR(0, 2256, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp_TwoPartyClient.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp_TwoPartyClient.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp_TwoPartyClient.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp_TwoPartyClient.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp_TwoPartyClient.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp_TwoPartyClient) < 0) __PYX_ERR(0, 2256, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TwoPartyClient, (PyObject *)&__pyx_type_5capnp_3lib_5capnp_TwoPartyClient) < 0) __PYX_ERR(0, 2256, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp_TwoPartyClient) < 0) __PYX_ERR(0, 2256, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp_TwoPartyClient = &__pyx_type_5capnp_3lib_5capnp_TwoPartyClient;
  __pyx_vtabptr_5capnp_3lib_5capnp_TwoPartyServer = &__pyx_vtable_5capnp_3lib_5capnp_TwoPartyServer;
  __pyx_vtable_5capnp_3lib_5capnp_TwoPartyServer._connect = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer__connect;
  __pyx_vtable_5capnp_3lib_5capnp_TwoPartyServer.on_disconnect = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_on_disconnect;
  __pyx_vtable_5capnp_3lib_5capnp_TwoPartyServer.run_forever = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_run_forever;
  __pyx_vtable_5capnp_3lib_5capnp_TwoPartyServer.bootstrap = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp_TwoPartyServer *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14TwoPartyServer_bootstrap;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp_TwoPartyServer) < 0) __PYX_ERR(0, 2352, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp_TwoPartyServer.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp_TwoPartyServer.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp_TwoPartyServer.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp_TwoPartyServer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp_TwoPartyServer.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp_TwoPartyServer) < 0) __PYX_ERR(0, 2352, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TwoPartyServer, (PyObject *)&__pyx_type_5capnp_3lib_5capnp_TwoPartyServer) < 0) __PYX_ERR(0, 2352, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp_TwoPartyServer) < 0) __PYX_ERR(0, 2352, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp_TwoPartyServer = &__pyx_type_5capnp_3lib_5capnp_TwoPartyServer;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__AsyncIoStream) < 0) __PYX_ERR(0, 2498, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__AsyncIoStream.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__AsyncIoStream.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__AsyncIoStream.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__AsyncIoStream.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AsyncIoStream, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__AsyncIoStream) < 0) __PYX_ERR(0, 2498, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__AsyncIoStream) < 0) __PYX_ERR(0, 2498, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream = &__pyx_type_5capnp_3lib_5capnp__AsyncIoStream;
  __pyx_vtabptr_5capnp_3lib_5capnp__TwoWayPipe = &__pyx_vtable_5capnp_3lib_5capnp__TwoWayPipe;
  __pyx_vtable_5capnp_3lib_5capnp__TwoWayPipe._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__TwoWayPipe *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_11_TwoWayPipe__init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__TwoWayPipe) < 0) __PYX_ERR(0, 2501, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__TwoWayPipe.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__TwoWayPipe.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__TwoWayPipe.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__TwoWayPipe.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__TwoWayPipe.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__TwoWayPipe) < 0) __PYX_ERR(0, 2501, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_TwoWayPipe, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__TwoWayPipe) < 0) __PYX_ERR(0, 2501, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__TwoWayPipe) < 0) __PYX_ERR(0, 2501, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__TwoWayPipe = &__pyx_type_5capnp_3lib_5capnp__TwoWayPipe;
  __pyx_vtabptr_5capnp_3lib_5capnp__FdAsyncIoStream = &__pyx_vtable_5capnp_3lib_5capnp__FdAsyncIoStream;
  __pyx_vtable_5capnp_3lib_5capnp__FdAsyncIoStream._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__FdAsyncIoStream *, int))__pyx_f_5capnp_3lib_5capnp_16_FdAsyncIoStream__init;
  __pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream.tp_base = __pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream) < 0) __PYX_ERR(0, 2513, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__FdAsyncIoStream) < 0) __PYX_ERR(0, 2513, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FdAsyncIoStream, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream) < 0) __PYX_ERR(0, 2513, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream) < 0) __PYX_ERR(0, 2513, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__FdAsyncIoStream = &__pyx_type_5capnp_3lib_5capnp__FdAsyncIoStream;
  __pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream.tp_base = __pyx_ptype_5capnp_3lib_5capnp__AsyncIoStream;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream) < 0) __PYX_ERR(0, 2523, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyAsyncIoStream, (PyObject *)&__pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream) < 0) __PYX_ERR(0, 2523, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream) < 0) __PYX_ERR(0, 2523, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp_PyAsyncIoStream = &__pyx_type_5capnp_3lib_5capnp_PyAsyncIoStream;
  __pyx_vtabptr_5capnp_3lib_5capnp_PromiseFulfillerPair = &__pyx_vtable_5capnp_3lib_5capnp_PromiseFulfillerPair;
  __pyx_vtable_5capnp_3lib_5capnp_PromiseFulfillerPair.fulfill = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp_PromiseFulfillerPair *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_20PromiseFulfillerPair_fulfill;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp_PromiseFulfillerPair) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PromiseFulfillerPair, (PyObject *)&__pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair) < 0) __PYX_ERR(0, 2527, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp_PromiseFulfillerPair = &__pyx_type_5capnp_3lib_5capnp_PromiseFulfillerPair;
  __pyx_vtabptr_5capnp_3lib_5capnp__StructSchema = &__pyx_vtable_5capnp_3lib_5capnp__StructSchema;
  __pyx_vtable_5capnp_3lib_5capnp__StructSchema._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__StructSchema *,  ::capnp::StructSchema))__pyx_f_5capnp_3lib_5capnp_13_StructSchema__init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__StructSchema) < 0) __PYX_ERR(0, 2565, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__StructSchema.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__StructSchema.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__StructSchema.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__StructSchema.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__StructSchema.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__StructSchema) < 0) __PYX_ERR(0, 2565, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StructSchema, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__StructSchema) < 0) __PYX_ERR(0, 2565, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__StructSchema) < 0) __PYX_ERR(0, 2565, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__StructSchema = &__pyx_type_5capnp_3lib_5capnp__StructSchema;
  __pyx_vtabptr_5capnp_3lib_5capnp__InterfaceMethod = &__pyx_vtable_5capnp_3lib_5capnp__InterfaceMethod;
  __pyx_vtable_5capnp_3lib_5capnp__InterfaceMethod._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__InterfaceMethod *,  ::capnp::InterfaceSchema::Method))__pyx_f_5capnp_3lib_5capnp_16_InterfaceMethod__init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__InterfaceMethod) < 0) __PYX_ERR(0, 2682, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__InterfaceMethod.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__InterfaceMethod.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__InterfaceMethod.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__InterfaceMethod.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__InterfaceMethod.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__InterfaceMethod) < 0) __PYX_ERR(0, 2682, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_InterfaceMethod, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__InterfaceMethod) < 0) __PYX_ERR(0, 2682, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__InterfaceMethod) < 0) __PYX_ERR(0, 2682, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__InterfaceMethod = &__pyx_type_5capnp_3lib_5capnp__InterfaceMethod;
  __pyx_vtabptr_5capnp_3lib_5capnp__EnumSchema = &__pyx_vtable_5capnp_3lib_5capnp__EnumSchema;
  __pyx_vtable_5capnp_3lib_5capnp__EnumSchema._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__EnumSchema *,  ::capnp::EnumSchema))__pyx_f_5capnp_3lib_5capnp_11_EnumSchema__init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__EnumSchema) < 0) __PYX_ERR(0, 2775, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__EnumSchema.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__EnumSchema.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__EnumSchema.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__EnumSchema.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__EnumSchema.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__EnumSchema) < 0) __PYX_ERR(0, 2775, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EnumSchema, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__EnumSchema) < 0) __PYX_ERR(0, 2775, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__EnumSchema) < 0) __PYX_ERR(0, 2775, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__EnumSchema = &__pyx_type_5capnp_3lib_5capnp__EnumSchema;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__SchemaType) < 0) __PYX_ERR(0, 2798, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__SchemaType.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__SchemaType.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__SchemaType.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__SchemaType.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SchemaType, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__SchemaType) < 0) __PYX_ERR(0, 2798, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__SchemaType) < 0) __PYX_ERR(0, 2798, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__SchemaType = &__pyx_type_5capnp_3lib_5capnp__SchemaType;
  __pyx_vtabptr_5capnp_3lib_5capnp__ListSchema = &__pyx_vtable_5capnp_3lib_5capnp__ListSchema;
  __pyx_vtable_5capnp_3lib_5capnp__ListSchema._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__ListSchema *,  ::capnp::ListSchema))__pyx_f_5capnp_3lib_5capnp_11_ListSchema__init;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__ListSchema) < 0) __PYX_ERR(0, 2878, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__ListSchema.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__ListSchema.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__ListSchema.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__ListSchema.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__ListSchema.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__ListSchema) < 0) __PYX_ERR(0, 2878, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ListSchema, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__ListSchema) < 0) __PYX_ERR(0, 2878, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__ListSchema) < 0) __PYX_ERR(0, 2878, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__ListSchema = &__pyx_type_5capnp_3lib_5capnp__ListSchema;
  __pyx_vtabptr_5capnp_3lib_5capnp__ParsedSchema = &__pyx_vtable_5capnp_3lib_5capnp__ParsedSchema;
  __pyx_vtable_5capnp_3lib_5capnp__ParsedSchema.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__Schema;
  __pyx_vtable_5capnp_3lib_5capnp__ParsedSchema._init_child = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *,  ::capnp::ParsedSchema))__pyx_f_5capnp_3lib_5capnp_13_ParsedSchema__init_child;
  __pyx_vtable_5capnp_3lib_5capnp__ParsedSchema.get_nested = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__ParsedSchema *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_13_ParsedSchema_get_nested;
  __pyx_type_5capnp_3lib_5capnp__ParsedSchema.tp_base = __pyx_ptype_5capnp_3lib_5capnp__Schema;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__ParsedSchema) < 0) __PYX_ERR(0, 2922, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__ParsedSchema.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__ParsedSchema.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__ParsedSchema.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__ParsedSchema.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__ParsedSchema.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__ParsedSchema) < 0) __PYX_ERR(0, 2922, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ParsedSchema, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__ParsedSchema) < 0) __PYX_ERR(0, 2922, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__ParsedSchema) < 0) __PYX_ERR(0, 2922, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__ParsedSchema = &__pyx_type_5capnp_3lib_5capnp__ParsedSchema;
  __pyx_vtabptr_5capnp_3lib_5capnp__MallocMessageBuilder = &__pyx_vtable_5capnp_3lib_5capnp__MallocMessageBuilder;
  __pyx_vtable_5capnp_3lib_5capnp__MallocMessageBuilder.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageBuilder;
  __pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder) < 0) __PYX_ERR(0, 3423, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__MallocMessageBuilder) < 0) __PYX_ERR(0, 3423, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MallocMessageBuilder, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder) < 0) __PYX_ERR(0, 3423, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder) < 0) __PYX_ERR(0, 3423, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__MallocMessageBuilder = &__pyx_type_5capnp_3lib_5capnp__MallocMessageBuilder;
  __pyx_vtabptr_5capnp_3lib_5capnp__MessageReader = &__pyx_vtable_5capnp_3lib_5capnp__MessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__MessageReader.get_root = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14_MessageReader_get_root;
  __pyx_vtable_5capnp_3lib_5capnp__MessageReader.get_root_as_any = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__MessageReader *, int __pyx_skip_dispatch))__pyx_f_5capnp_3lib_5capnp_14_MessageReader_get_root_as_any;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__MessageReader) < 0) __PYX_ERR(0, 3444, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__MessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__MessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__MessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__MessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__MessageReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__MessageReader) < 0) __PYX_ERR(0, 3444, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MessageReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__MessageReader) < 0) __PYX_ERR(0, 3444, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__MessageReader) < 0) __PYX_ERR(0, 3444, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__MessageReader = &__pyx_type_5capnp_3lib_5capnp__MessageReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__StreamFdMessageReader = &__pyx_vtable_5capnp_3lib_5capnp__StreamFdMessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__StreamFdMessageReader.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;
  __pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader) < 0) __PYX_ERR(0, 3489, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__StreamFdMessageReader) < 0) __PYX_ERR(0, 3489, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StreamFdMessageReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader) < 0) __PYX_ERR(0, 3489, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader) < 0) __PYX_ERR(0, 3489, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__StreamFdMessageReader = &__pyx_type_5capnp_3lib_5capnp__StreamFdMessageReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__PackedMessageReader = &__pyx_vtable_5capnp_3lib_5capnp__PackedMessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__PackedMessageReader.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__PackedMessageReader._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__PackedMessageReader *,  ::kj::BufferedInputStream &, struct __pyx_opt_args_5capnp_3lib_5capnp_20_PackedMessageReader__init *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_20_PackedMessageReader__init;
  __pyx_type_5capnp_3lib_5capnp__PackedMessageReader.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__PackedMessageReader) < 0) __PYX_ERR(0, 3511, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__PackedMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__PackedMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__PackedMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__PackedMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__PackedMessageReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__PackedMessageReader) < 0) __PYX_ERR(0, 3511, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PackedMessageReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__PackedMessageReader) < 0) __PYX_ERR(0, 3511, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__PackedMessageReader) < 0) __PYX_ERR(0, 3511, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__PackedMessageReader = &__pyx_type_5capnp_3lib_5capnp__PackedMessageReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__PackedMessageReaderBytes = &__pyx_vtable_5capnp_3lib_5capnp__PackedMessageReaderBytes;
  __pyx_vtable_5capnp_3lib_5capnp__PackedMessageReaderBytes.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;
  __pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes) < 0) __PYX_ERR(0, 3537, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__PackedMessageReaderBytes) < 0) __PYX_ERR(0, 3537, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PackedMessageReaderBytes, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes) < 0) __PYX_ERR(0, 3537, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes) < 0) __PYX_ERR(0, 3537, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__PackedMessageReaderBytes = &__pyx_type_5capnp_3lib_5capnp__PackedMessageReaderBytes;
  __pyx_vtabptr_5capnp_3lib_5capnp__InputMessageReader = &__pyx_vtable_5capnp_3lib_5capnp__InputMessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__InputMessageReader.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__InputMessageReader._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__InputMessageReader *,  ::kj::BufferedInputStream &, struct __pyx_opt_args_5capnp_3lib_5capnp_19_InputMessageReader__init *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_19_InputMessageReader__init;
  __pyx_type_5capnp_3lib_5capnp__InputMessageReader.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__InputMessageReader) < 0) __PYX_ERR(0, 3558, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__InputMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__InputMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__InputMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__InputMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__InputMessageReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__InputMessageReader) < 0) __PYX_ERR(0, 3558, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_InputMessageReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__InputMessageReader) < 0) __PYX_ERR(0, 3558, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__InputMessageReader) < 0) __PYX_ERR(0, 3558, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__InputMessageReader = &__pyx_type_5capnp_3lib_5capnp__InputMessageReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__PackedFdMessageReader = &__pyx_vtable_5capnp_3lib_5capnp__PackedFdMessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__PackedFdMessageReader.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;
  __pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader) < 0) __PYX_ERR(0, 3584, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__PackedFdMessageReader) < 0) __PYX_ERR(0, 3584, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PackedFdMessageReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader) < 0) __PYX_ERR(0, 3584, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader) < 0) __PYX_ERR(0, 3584, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__PackedFdMessageReader = &__pyx_type_5capnp_3lib_5capnp__PackedFdMessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__MultipleMessageReader) < 0) __PYX_ERR(0, 3606, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__MultipleMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__MultipleMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__MultipleMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__MultipleMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MultipleMessageReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__MultipleMessageReader) < 0) __PYX_ERR(0, 3606, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__MultipleMessageReader) < 0) __PYX_ERR(0, 3606, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__MultipleMessageReader = &__pyx_type_5capnp_3lib_5capnp__MultipleMessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__MultiplePackedMessageReader) < 0) __PYX_ERR(0, 3643, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__MultiplePackedMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__MultiplePackedMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__MultiplePackedMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__MultiplePackedMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MultiplePackedMessageReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__MultiplePackedMessageReader) < 0) __PYX_ERR(0, 3643, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__MultiplePackedMessageReader) < 0) __PYX_ERR(0, 3643, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__MultiplePackedMessageReader = &__pyx_type_5capnp_3lib_5capnp__MultiplePackedMessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__MultipleBytesMessageReader) < 0) __PYX_ERR(0, 3680, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__MultipleBytesMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__MultipleBytesMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__MultipleBytesMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__MultipleBytesMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MultipleBytesMessageReader, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__MultipleBytesMessageReader) < 0) __PYX_ERR(0, 3680, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__MultipleBytesMessageReader) < 0) __PYX_ERR(0, 3680, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__MultipleBytesMessageReader = &__pyx_type_5capnp_3lib_5capnp__MultipleBytesMessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader) < 0) __PYX_ERR(0, 3728, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_MultipleBytesPackedMessageReade, (PyObject *)&__pyx_type_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader) < 0) __PYX_ERR(0, 3728, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader) < 0) __PYX_ERR(0, 3728, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader = &__pyx_type_5capnp_3lib_5capnp__MultipleBytesPackedMessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__AlignedBuffer) < 0) __PYX_ERR(0, 3766, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__AlignedBuffer.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__AlignedBuffer.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__AlignedBuffer.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__AlignedBuffer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__AlignedBuffer) < 0) __PYX_ERR(0, 3766, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__AlignedBuffer = &__pyx_type_5capnp_3lib_5capnp__AlignedBuffer;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__BufferView) < 0) __PYX_ERR(0, 3790, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__BufferView.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__BufferView.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__BufferView.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__BufferView.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__BufferView) < 0) __PYX_ERR(0, 3790, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__BufferView = &__pyx_type_5capnp_3lib_5capnp__BufferView;
  __pyx_vtabptr_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned = &__pyx_vtable_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned;
  __pyx_vtable_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned._init = (PyObject *(*)(struct __pyx_obj_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned *, PyObject *, char const *, Py_ssize_t, struct __pyx_opt_args_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init *__pyx_optional_args))__pyx_f_5capnp_3lib_5capnp_30_FlatArrayMessageReaderAligned__init;
  __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned) < 0) __PYX_ERR(0, 3804, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned) < 0) __PYX_ERR(0, 3804, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned) < 0) __PYX_ERR(0, 3804, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned = &__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReaderAligned;
  __pyx_vtabptr_5capnp_3lib_5capnp__FlatArrayMessageReader = &__pyx_vtable_5capnp_3lib_5capnp__FlatArrayMessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__FlatArrayMessageReader.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;
  __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader) < 0) __PYX_ERR(0, 3835, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__FlatArrayMessageReader) < 0) __PYX_ERR(0, 3835, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader) < 0) __PYX_ERR(0, 3835, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__FlatArrayMessageReader = &__pyx_type_5capnp_3lib_5capnp__FlatArrayMessageReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__SegmentArrayMessageReader = &__pyx_vtable_5capnp_3lib_5capnp__SegmentArrayMessageReader;
  __pyx_vtable_5capnp_3lib_5capnp__SegmentArrayMessageReader.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageReader;
  __pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageReader;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader) < 0) __PYX_ERR(0, 3870, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__SegmentArrayMessageReader) < 0) __PYX_ERR(0, 3870, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader) < 0) __PYX_ERR(0, 3870, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__SegmentArrayMessageReader = &__pyx_type_5capnp_3lib_5capnp__SegmentArrayMessageReader;
  __pyx_vtabptr_5capnp_3lib_5capnp__FlatMessageBuilder = &__pyx_vtable_5capnp_3lib_5capnp__FlatMessageBuilder;
  __pyx_vtable_5capnp_3lib_5capnp__FlatMessageBuilder.__pyx_base = *__pyx_vtabptr_5capnp_3lib_5capnp__MessageBuilder;
  __pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder.tp_base = __pyx_ptype_5capnp_3lib_5capnp__MessageBuilder;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder) < 0) __PYX_ERR(0, 3907, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder.tp_dict, __pyx_vtabptr_5capnp_3lib_5capnp__FlatMessageBuilder) < 0) __PYX_ERR(0, 3907, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder) < 0) __PYX_ERR(0, 3907, __pyx_L1_error)
  __pyx_ptype_5capnp_3lib_5capnp__FlatMessageBuilder = &__pyx_type_5capnp_3lib_5capnp__FlatMessageBuilder;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct___make_enum) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct___make_enum.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct___make_enum.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct___make_enum.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct___make_enum.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct___make_enum = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct___make_enum;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_1_genexpr;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait) < 0) __PYX_ERR(0, 1950, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_2_a_wait;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_3_read) < 0) __PYX_ERR(0, 2296, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_3_read.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_3_read.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_3_read.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_3_read.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_3_read = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_3_read;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_4_read) < 0) __PYX_ERR(0, 2409, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_4_read.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_4_read.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_4_read.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_4_read.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_4_read = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_4_read;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_5_write) < 0) __PYX_ERR(0, 2429, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_5_write.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_5_write.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_5_write.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_5_write.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_5_write = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_5_write;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever) < 0) __PYX_ERR(0, 2473, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_6_poll_forever;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_7___get__) < 0) __PYX_ERR(0, 2581, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_7___get__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_7___get__.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_7___get__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_7___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_7___get__ = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_7___get__;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr) < 0) __PYX_ERR(0, 2586, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_8_genexpr;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_9___get__) < 0) __PYX_ERR(0, 2592, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_9___get__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_9___get__.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_9___get__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_9___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_9___get__ = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_9___get__;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr) < 0) __PYX_ERR(0, 2597, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_10_genexpr;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_11___get__) < 0) __PYX_ERR(0, 2603, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_11___get__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_11___get__.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_11___get__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_11___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_11___get__ = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_11___get__;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(0, 2608, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_12_genexpr;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_13___get__) < 0) __PYX_ERR(0, 2708, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_13___get__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_13___get__.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_13___get__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_13___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_13___get__ = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_13___get__;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr) < 0) __PYX_ERR(0, 2713, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_14_genexpr;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_15___get__) < 0) __PYX_ERR(0, 2719, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_15___get__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_15___get__.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_15___get__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_15___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_15___get__ = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_15___get__;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr) < 0) __PYX_ERR(0, 2725, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_16_genexpr;
  if (PyType_Ready(&__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_17_load) < 0) __PYX_ERR(0, 3195, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_17_load.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_17_load.tp_dictoffset && __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_17_load.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_17_load.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_5capnp_3lib_5capnp___pyx_scope_struct_17_load = &__pyx_type_5capnp_3lib_5capnp___pyx_scope_struct_17_load;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(5, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(6, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_5array_array = __Pyx_ImportType(__pyx_t_1, "array", "array", sizeof(arrayobject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_5array_array) __PYX_ERR(3, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initcapnp(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initcapnp(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_capnp(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_capnp(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_capnp(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'capnp' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #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("__Pyx_PyMODINIT_FUNC PyInit_capnp(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __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 CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("capnp", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __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_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_capnp__lib__capnp) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "capnp.lib.capnp")) {
      if (unlikely(PyDict_SetItemString(modules, "capnp.lib.capnp", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "capnp/lib/capnp.pyx":22
 * from libc.string cimport memcpy
 * 
 * import array             # <<<<<<<<<<<<<<
 * import asyncio
 * import collections as _collections
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_array, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":23
 * 
 * import array
 * import asyncio             # <<<<<<<<<<<<<<
 * import collections as _collections
 * import inspect as _inspect
 */
  __pyx_t_1 = __Pyx_patch_asyncio(__Pyx_Import(__pyx_n_s_asyncio, 0, -1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_asyncio, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":24
 * import array
 * import asyncio
 * import collections as _collections             # <<<<<<<<<<<<<<
 * import inspect as _inspect
 * import os as _os
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections_2, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":25
 * import asyncio
 * import collections as _collections
 * import inspect as _inspect             # <<<<<<<<<<<<<<
 * import os as _os
 * import random as _random
 */
  __pyx_t_1 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect_2, 0, -1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_1) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":26
 * import collections as _collections
 * import inspect as _inspect
 * import os as _os             # <<<<<<<<<<<<<<
 * import random as _random
 * import socket as _socket
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os_2, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":27
 * import inspect as _inspect
 * import os as _os
 * import random as _random             # <<<<<<<<<<<<<<
 * import socket as _socket
 * import sys as _sys
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_random, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_random_2, __pyx_t_1) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":28
 * import os as _os
 * import random as _random
 * import socket as _socket             # <<<<<<<<<<<<<<
 * import sys as _sys
 * import threading as _threading
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_socket, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_socket_2, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":29
 * import random as _random
 * import socket as _socket
 * import sys as _sys             # <<<<<<<<<<<<<<
 * import threading as _threading
 * import traceback as _traceback
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys_2, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":30
 * import socket as _socket
 * import sys as _sys
 * import threading as _threading             # <<<<<<<<<<<<<<
 * import traceback as _traceback
 * import warnings as _warnings
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_threading_2, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":31
 * import sys as _sys
 * import threading as _threading
 * import traceback as _traceback             # <<<<<<<<<<<<<<
 * import warnings as _warnings
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_traceback, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback_2, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":32
 * import threading as _threading
 * import traceback as _traceback
 * import warnings as _warnings             # <<<<<<<<<<<<<<
 * 
 * from types import ModuleType as _ModuleType
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings_2, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":34
 * import warnings as _warnings
 * 
 * from types import ModuleType as _ModuleType             # <<<<<<<<<<<<<<
 * from operator import attrgetter as _attrgetter
 * from functools import partial as _partial
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_ModuleType_2);
  __Pyx_GIVEREF(__pyx_n_s_ModuleType_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ModuleType_2);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_types, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ModuleType_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ModuleType, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":35
 * 
 * from types import ModuleType as _ModuleType
 * from operator import attrgetter as _attrgetter             # <<<<<<<<<<<<<<
 * from functools import partial as _partial
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_attrgetter_2);
  __Pyx_GIVEREF(__pyx_n_s_attrgetter_2);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_attrgetter_2);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_operator, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_attrgetter_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_attrgetter, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":36
 * from types import ModuleType as _ModuleType
 * from operator import attrgetter as _attrgetter
 * from functools import partial as _partial             # <<<<<<<<<<<<<<
 * 
 * _CAPNP_VERSION_MAJOR = capnp.CAPNP_VERSION_MAJOR
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_partial_2);
  __Pyx_GIVEREF(__pyx_n_s_partial_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_partial_2);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_partial_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_partial, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":38
 * from functools import partial as _partial
 * 
 * _CAPNP_VERSION_MAJOR = capnp.CAPNP_VERSION_MAJOR             # <<<<<<<<<<<<<<
 * _CAPNP_VERSION_MINOR = capnp.CAPNP_VERSION_MINOR
 * _CAPNP_VERSION_MICRO = capnp.CAPNP_VERSION_MICRO
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(CAPNP_VERSION_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPNP_VERSION_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":39
 * 
 * _CAPNP_VERSION_MAJOR = capnp.CAPNP_VERSION_MAJOR
 * _CAPNP_VERSION_MINOR = capnp.CAPNP_VERSION_MINOR             # <<<<<<<<<<<<<<
 * _CAPNP_VERSION_MICRO = capnp.CAPNP_VERSION_MICRO
 * _CAPNP_VERSION = capnp.CAPNP_VERSION
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(CAPNP_VERSION_MINOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPNP_VERSION_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":40
 * _CAPNP_VERSION_MAJOR = capnp.CAPNP_VERSION_MAJOR
 * _CAPNP_VERSION_MINOR = capnp.CAPNP_VERSION_MINOR
 * _CAPNP_VERSION_MICRO = capnp.CAPNP_VERSION_MICRO             # <<<<<<<<<<<<<<
 * _CAPNP_VERSION = capnp.CAPNP_VERSION
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(CAPNP_VERSION_MICRO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPNP_VERSION_MICRO, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":41
 * _CAPNP_VERSION_MINOR = capnp.CAPNP_VERSION_MINOR
 * _CAPNP_VERSION_MICRO = capnp.CAPNP_VERSION_MICRO
 * _CAPNP_VERSION = capnp.CAPNP_VERSION             # <<<<<<<<<<<<<<
 * 
 * cdef dict _type_registry = {}
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(CAPNP_VERSION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPNP_VERSION, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":43
 * _CAPNP_VERSION = capnp.CAPNP_VERSION
 * 
 * cdef dict _type_registry = {}             # <<<<<<<<<<<<<<
 * 
 * def register_type(id, klass):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_v_5capnp_3lib_5capnp__type_registry);
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__type_registry, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":45
 * cdef dict _type_registry = {}
 * 
 * def register_type(id, klass):             # <<<<<<<<<<<<<<
 *     _type_registry[id] = klass
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_1register_type, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_register_type, __pyx_t_2) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":48
 *     _type_registry[id] = klass
 * 
 * def deregister_all_types():             # <<<<<<<<<<<<<<
 *     _type_registry = {}
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_3deregister_all_types, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_deregister_all_types, __pyx_t_2) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":152
 *     String strException" ::kj::str"(capnp.Exception)
 * 
 * def _make_enum(enum_name, *sequential, **named):             # <<<<<<<<<<<<<<
 *     enums = dict(zip(sequential, range(len(sequential))), **named)
 *     reverse = dict((value, key) for key, value in enums.iteritems())
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_5_make_enum, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_enum, __pyx_t_2) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":158
 *     return type(enum_name, (), enums)
 * 
 * _Type = _make_enum('_Type',             # <<<<<<<<<<<<<<
 *                     FAILED = 0,
 *                     OVERLOADED = 1,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_make_enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "capnp/lib/capnp.pyx":159
 * 
 * _Type = _make_enum('_Type',
 *                     FAILED = 0,             # <<<<<<<<<<<<<<
 *                     OVERLOADED = 1,
 *                     DISCONNECTED = 2,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_FAILED, __pyx_int_0) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_OVERLOADED, __pyx_int_1) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_DISCONNECTED, __pyx_int_2) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_UNIMPLEMENTED, __pyx_int_3) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_OTHER, __pyx_int_4) < 0) __PYX_ERR(0, 159, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":158
 *     return type(enum_name, (), enums)
 * 
 * _Type = _make_enum('_Type',             # <<<<<<<<<<<<<<
 *                     FAILED = 0,
 *                     OVERLOADED = 1,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__147, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Type, __pyx_t_3) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":193
 * 
 * # Extension classes can't inherit from Exception, so we're going to proxy wrap kj::Exception, and forward all calls to it from this Python class
 * class KjException(Exception):             # <<<<<<<<<<<<<<
 * 
 *     '''KjException is a wrapper of the internal C++ exception type. There is an enum named `Type` listed below, and a bunch of fields'''
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_KjException, __pyx_n_s_KjException, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, __pyx_kp_s_KjException_is_a_wrapper_of_the); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "capnp/lib/capnp.pyx":197
 *     '''KjException is a wrapper of the internal C++ exception type. There is an enum named `Type` listed below, and a bunch of fields'''
 * 
 *     Type = _make_enum('Type', **{x : x for x in _Type.reverse_mapping.values()})             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, message=None, nature=None, durability=None, wrapper=None, type=None):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_make_enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  { /* enter inner scope */
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_reverse_mapping); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 197, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 197, __pyx_L4_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_7))) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L4_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L4_error)
          #else
          __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 197, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_10(__pyx_t_7);
        if (unlikely(!__pyx_t_6)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 197, __pyx_L4_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_5capnp_3lib_5capnp_11KjException_x, __pyx_t_6);
      __pyx_t_6 = 0;
      if (unlikely(PyDict_SetItem(__pyx_t_5, (PyObject*)__pyx_8genexpr2__pyx_v_5capnp_3lib_5capnp_11KjException_x, (PyObject*)__pyx_8genexpr2__pyx_v_5capnp_3lib_5capnp_11KjException_x))) __PYX_ERR(0, 197, __pyx_L4_error)
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_5capnp_3lib_5capnp_11KjException_x); __pyx_8genexpr2__pyx_v_5capnp_3lib_5capnp_11KjException_x = 0;
    goto __pyx_L7_exit_scope;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_5capnp_3lib_5capnp_11KjException_x); __pyx_8genexpr2__pyx_v_5capnp_3lib_5capnp_11KjException_x = 0;
    goto __pyx_L1_error;
    __pyx_L7_exit_scope:;
  } /* exit inner scope */
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__148, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Type_2, __pyx_t_7) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "capnp/lib/capnp.pyx":199
 *     Type = _make_enum('Type', **{x : x for x in _Type.reverse_mapping.values()})
 * 
 *     def __init__(self, message=None, nature=None, durability=None, wrapper=None, type=None):             # <<<<<<<<<<<<<<
 *         if wrapper is not None:
 *             self.wrapper = wrapper
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_11KjException_1__init__, 0, __pyx_n_s_KjException___init, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__151);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_3, __pyx_t_7) < 0) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "capnp/lib/capnp.pyx":211
 * 
 *     @property
 *     def file(self):             # <<<<<<<<<<<<<<
 *         return self.wrapper.file
 *     @property
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_11KjException_3file, 0, __pyx_n_s_KjException_file, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "capnp/lib/capnp.pyx":210
 *             self._type = type
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def file(self):
 *         return self.wrapper.file
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_file, __pyx_t_5) < 0) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "capnp/lib/capnp.pyx":214
 *         return self.wrapper.file
 *     @property
 *     def line(self):             # <<<<<<<<<<<<<<
 *         return self.wrapper.line
 *     @property
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_11KjException_5line, 0, __pyx_n_s_KjException_line, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "capnp/lib/capnp.pyx":213
 *     def file(self):
 *         return self.wrapper.file
 *     @property             # <<<<<<<<<<<<<<
 *     def line(self):
 *         return self.wrapper.line
 */
  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_line, __pyx_t_7) < 0) __PYX_ERR(0, 214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "capnp/lib/capnp.pyx":217
 *         return self.wrapper.line
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         if self.wrapper is not None:
 *             return self.wrapper.type
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_11KjException_7type, 0, __pyx_n_s_KjException_type, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "capnp/lib/capnp.pyx":216
 *     def line(self):
 *         return self.wrapper.line
 *     @property             # <<<<<<<<<<<<<<
 *     def type(self):
 *         if self.wrapper is not None:
 */
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_type, __pyx_t_5) < 0) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "capnp/lib/capnp.pyx":223
 *             return self._type
 *     @property
 *     def description(self):             # <<<<<<<<<<<<<<
 *         if self.wrapper is not None:
 *             return self.wrapper.description
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_11KjException_9description, 0, __pyx_n_s_KjException_description, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "capnp/lib/capnp.pyx":222
 *         else:
 *             return self._type
 *     @property             # <<<<<<<<<<<<<<
 *     def description(self):
 *         if self.wrapper is not None:
 */
  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_description, __pyx_t_7) < 0) __PYX_ERR(0, 223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "capnp/lib/capnp.pyx":229
 *             return self.message
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.message
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_11KjException_11__str__, 0, __pyx_n_s_KjException___str, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_str_2, __pyx_t_7) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "capnp/lib/capnp.pyx":232
 *         return self.message
 * 
 *     def _to_python(self):             # <<<<<<<<<<<<<<
 *         message = self.message
 *         if self.wrapper.type == 'FAILED':
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_11KjException_13_to_python, 0, __pyx_n_s_KjException__to_python, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_to_python, __pyx_t_7) < 0) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "capnp/lib/capnp.pyx":193
 * 
 * # Extension classes can't inherit from Exception, so we're going to proxy wrap kj::Exception, and forward all calls to it from this Python class
 * class KjException(Exception):             # <<<<<<<<<<<<<<
 * 
 *     '''KjException is a wrapper of the internal C++ exception type. There is an enum named `Type` listed below, and a bunch of fields'''
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_KjException, __pyx_t_3, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KjException, __pyx_t_7) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":1004
 *         self.cap_count = cap_count
 * 
 * if getattr(_sys, 'subversion', [''])[0] == 'PyPy':             # <<<<<<<<<<<<<<
 *     from pickle_helper import _struct_reducer
 * else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_s__4);
  __Pyx_GIVEREF(__pyx_kp_s__4);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__4);
  __pyx_t_2 = __Pyx_GetAttr3(__pyx_t_3, __pyx_n_s_subversion, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_PyPy, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_11) {

    /* "capnp/lib/capnp.pyx":1005
 * 
 * if getattr(_sys, 'subversion', [''])[0] == 'PyPy':
 *     from pickle_helper import _struct_reducer             # <<<<<<<<<<<<<<
 * else:
 *     def _struct_reducer(schema_id, data):
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_struct_reducer);
    __Pyx_GIVEREF(__pyx_n_s_struct_reducer);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_struct_reducer);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_pickle_helper, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_struct_reducer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct_reducer, __pyx_t_1) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "capnp/lib/capnp.pyx":1004
 *         self.cap_count = cap_count
 * 
 * if getattr(_sys, 'subversion', [''])[0] == 'PyPy':             # <<<<<<<<<<<<<<
 *     from pickle_helper import _struct_reducer
 * else:
 */
    goto __pyx_L8;
  }

  /* "capnp/lib/capnp.pyx":1007
 *     from pickle_helper import _struct_reducer
 * else:
 *     def _struct_reducer(schema_id, data):             # <<<<<<<<<<<<<<
 *         return _global_schema_parser.modules_by_id[schema_id].from_bytes(data)
 * 
 */
  /*else*/ {
    __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_7_struct_reducer, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct_reducer, __pyx_t_2) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L8:;

  /* "capnp/lib/capnp.pyx":1656
 * cdef _EventLoop C_DEFAULT_EVENT_LOOP
 * 
 * _C_DEFAULT_EVENT_LOOP_LOCAL = None             # <<<<<<<<<<<<<<
 * _THREAD_LOCAL_EVENT_LOOPS = []
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_C_DEFAULT_EVENT_LOOP_LOCAL, Py_None) < 0) __PYX_ERR(0, 1656, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":1657
 * 
 * _C_DEFAULT_EVENT_LOOP_LOCAL = None
 * _THREAD_LOCAL_EVENT_LOOPS = []             # <<<<<<<<<<<<<<
 * 
 * cdef _EventLoop C_DEFAULT_EVENT_LOOP_GETTER():
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_THREAD_LOCAL_EVENT_LOOPS, __pyx_t_2) < 0) __PYX_ERR(0, 1657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":1685
 *         return _VoidPromise()._init(self.thisptr.afterDelay(capnp.Nanoseconds(time)))
 * 
 * def getTimer():             # <<<<<<<<<<<<<<
 *     """
 *     Get libcapnp event loop timer
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_9getTimer, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTimer, __pyx_t_2) < 0) __PYX_ERR(0, 1685, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":1733
 *     create_event_loop(threaded)
 * 
 * def wait_forever():             # <<<<<<<<<<<<<<
 *     """
 *     Use libcapnp event loop to poll/wait forever
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_17wait_forever, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_wait_forever, __pyx_t_2) < 0) __PYX_ERR(0, 1733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":1740
 *     helpers.waitNeverDone(deref(loop.thisptr).waitScope)
 * 
 * def poll_once():             # <<<<<<<<<<<<<<
 *     """
 *     Poll libcapnp event loop once
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_19poll_once, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_poll_once, __pyx_t_2) < 0) __PYX_ERR(0, 1740, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":2801
 *     cdef capnp.SchemaType thisptr
 * 
 * types = _ModuleType('capnp.types')             # <<<<<<<<<<<<<<
 * cdef _SchemaType _void = _SchemaType()
 * _void.thisptr = capnp.SchemaType(capnp.TypeWhichVOID)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ModuleType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__171, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_types, __pyx_t_1) < 0) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2802
 * 
 * types = _ModuleType('capnp.types')
 * cdef _SchemaType _void = _SchemaType()             # <<<<<<<<<<<<<<
 * _void.thisptr = capnp.SchemaType(capnp.TypeWhichVOID)
 * types.Void = _void
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__void));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__void, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2803
 * types = _ModuleType('capnp.types')
 * cdef _SchemaType _void = _SchemaType()
 * _void.thisptr = capnp.SchemaType(capnp.TypeWhichVOID)             # <<<<<<<<<<<<<<
 * types.Void = _void
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__void->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::VOID);

  /* "capnp/lib/capnp.pyx":2804
 * cdef _SchemaType _void = _SchemaType()
 * _void.thisptr = capnp.SchemaType(capnp.TypeWhichVOID)
 * types.Void = _void             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _bool = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Void, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__void)) < 0) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2806
 * types.Void = _void
 * 
 * cdef _SchemaType _bool = _SchemaType()             # <<<<<<<<<<<<<<
 * _bool.thisptr = capnp.SchemaType(capnp.TypeWhichBOOL)
 * types.Bool = _bool
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__bool));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__bool, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2807
 * 
 * cdef _SchemaType _bool = _SchemaType()
 * _bool.thisptr = capnp.SchemaType(capnp.TypeWhichBOOL)             # <<<<<<<<<<<<<<
 * types.Bool = _bool
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__bool->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::BOOL);

  /* "capnp/lib/capnp.pyx":2808
 * cdef _SchemaType _bool = _SchemaType()
 * _bool.thisptr = capnp.SchemaType(capnp.TypeWhichBOOL)
 * types.Bool = _bool             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _int8 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Bool, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__bool)) < 0) __PYX_ERR(0, 2808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2810
 * types.Bool = _bool
 * 
 * cdef _SchemaType _int8 = _SchemaType()             # <<<<<<<<<<<<<<
 * _int8.thisptr = capnp.SchemaType(capnp.TypeWhichINT8)
 * types.Int8 = _int8
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__int8));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__int8, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2811
 * 
 * cdef _SchemaType _int8 = _SchemaType()
 * _int8.thisptr = capnp.SchemaType(capnp.TypeWhichINT8)             # <<<<<<<<<<<<<<
 * types.Int8 = _int8
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__int8->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::INT8);

  /* "capnp/lib/capnp.pyx":2812
 * cdef _SchemaType _int8 = _SchemaType()
 * _int8.thisptr = capnp.SchemaType(capnp.TypeWhichINT8)
 * types.Int8 = _int8             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _int16 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Int8, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__int8)) < 0) __PYX_ERR(0, 2812, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2814
 * types.Int8 = _int8
 * 
 * cdef _SchemaType _int16 = _SchemaType()             # <<<<<<<<<<<<<<
 * _int16.thisptr = capnp.SchemaType(capnp.TypeWhichINT16)
 * types.Int16 = _int16
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__int16));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__int16, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2815
 * 
 * cdef _SchemaType _int16 = _SchemaType()
 * _int16.thisptr = capnp.SchemaType(capnp.TypeWhichINT16)             # <<<<<<<<<<<<<<
 * types.Int16 = _int16
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__int16->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::INT16);

  /* "capnp/lib/capnp.pyx":2816
 * cdef _SchemaType _int16 = _SchemaType()
 * _int16.thisptr = capnp.SchemaType(capnp.TypeWhichINT16)
 * types.Int16 = _int16             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _int32 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Int16, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__int16)) < 0) __PYX_ERR(0, 2816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2818
 * types.Int16 = _int16
 * 
 * cdef _SchemaType _int32 = _SchemaType()             # <<<<<<<<<<<<<<
 * _int32.thisptr = capnp.SchemaType(capnp.TypeWhichINT32)
 * types.Int32 = _int32
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__int32));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__int32, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2819
 * 
 * cdef _SchemaType _int32 = _SchemaType()
 * _int32.thisptr = capnp.SchemaType(capnp.TypeWhichINT32)             # <<<<<<<<<<<<<<
 * types.Int32 = _int32
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__int32->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::INT32);

  /* "capnp/lib/capnp.pyx":2820
 * cdef _SchemaType _int32 = _SchemaType()
 * _int32.thisptr = capnp.SchemaType(capnp.TypeWhichINT32)
 * types.Int32 = _int32             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _int64 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Int32, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__int32)) < 0) __PYX_ERR(0, 2820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2822
 * types.Int32 = _int32
 * 
 * cdef _SchemaType _int64 = _SchemaType()             # <<<<<<<<<<<<<<
 * _int64.thisptr = capnp.SchemaType(capnp.TypeWhichINT64)
 * types.Int64 = _int64
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__int64));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__int64, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2823
 * 
 * cdef _SchemaType _int64 = _SchemaType()
 * _int64.thisptr = capnp.SchemaType(capnp.TypeWhichINT64)             # <<<<<<<<<<<<<<
 * types.Int64 = _int64
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__int64->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::INT64);

  /* "capnp/lib/capnp.pyx":2824
 * cdef _SchemaType _int64 = _SchemaType()
 * _int64.thisptr = capnp.SchemaType(capnp.TypeWhichINT64)
 * types.Int64 = _int64             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _uint8 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Int64, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__int64)) < 0) __PYX_ERR(0, 2824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2826
 * types.Int64 = _int64
 * 
 * cdef _SchemaType _uint8 = _SchemaType()             # <<<<<<<<<<<<<<
 * _uint8.thisptr = capnp.SchemaType(capnp.TypeWhichUINT8)
 * types.UInt8 = _uint8
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__uint8));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__uint8, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2827
 * 
 * cdef _SchemaType _uint8 = _SchemaType()
 * _uint8.thisptr = capnp.SchemaType(capnp.TypeWhichUINT8)             # <<<<<<<<<<<<<<
 * types.UInt8 = _uint8
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__uint8->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::UINT8);

  /* "capnp/lib/capnp.pyx":2828
 * cdef _SchemaType _uint8 = _SchemaType()
 * _uint8.thisptr = capnp.SchemaType(capnp.TypeWhichUINT8)
 * types.UInt8 = _uint8             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _uint16 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_UInt8, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__uint8)) < 0) __PYX_ERR(0, 2828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2830
 * types.UInt8 = _uint8
 * 
 * cdef _SchemaType _uint16 = _SchemaType()             # <<<<<<<<<<<<<<
 * _uint16.thisptr = capnp.SchemaType(capnp.TypeWhichUINT16)
 * types.UInt16 = _uint16
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__uint16));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__uint16, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2831
 * 
 * cdef _SchemaType _uint16 = _SchemaType()
 * _uint16.thisptr = capnp.SchemaType(capnp.TypeWhichUINT16)             # <<<<<<<<<<<<<<
 * types.UInt16 = _uint16
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__uint16->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::UINT16);

  /* "capnp/lib/capnp.pyx":2832
 * cdef _SchemaType _uint16 = _SchemaType()
 * _uint16.thisptr = capnp.SchemaType(capnp.TypeWhichUINT16)
 * types.UInt16 = _uint16             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _uint32 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_UInt16, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__uint16)) < 0) __PYX_ERR(0, 2832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2834
 * types.UInt16 = _uint16
 * 
 * cdef _SchemaType _uint32 = _SchemaType()             # <<<<<<<<<<<<<<
 * _uint32.thisptr = capnp.SchemaType(capnp.TypeWhichUINT32)
 * types.UInt32 = _uint32
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__uint32));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__uint32, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2835
 * 
 * cdef _SchemaType _uint32 = _SchemaType()
 * _uint32.thisptr = capnp.SchemaType(capnp.TypeWhichUINT32)             # <<<<<<<<<<<<<<
 * types.UInt32 = _uint32
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__uint32->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::UINT32);

  /* "capnp/lib/capnp.pyx":2836
 * cdef _SchemaType _uint32 = _SchemaType()
 * _uint32.thisptr = capnp.SchemaType(capnp.TypeWhichUINT32)
 * types.UInt32 = _uint32             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _uint64 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_UInt32, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__uint32)) < 0) __PYX_ERR(0, 2836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2838
 * types.UInt32 = _uint32
 * 
 * cdef _SchemaType _uint64 = _SchemaType()             # <<<<<<<<<<<<<<
 * _uint64.thisptr = capnp.SchemaType(capnp.TypeWhichUINT64)
 * types.UInt64 = _uint64
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__uint64));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__uint64, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2839
 * 
 * cdef _SchemaType _uint64 = _SchemaType()
 * _uint64.thisptr = capnp.SchemaType(capnp.TypeWhichUINT64)             # <<<<<<<<<<<<<<
 * types.UInt64 = _uint64
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__uint64->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::UINT64);

  /* "capnp/lib/capnp.pyx":2840
 * cdef _SchemaType _uint64 = _SchemaType()
 * _uint64.thisptr = capnp.SchemaType(capnp.TypeWhichUINT64)
 * types.UInt64 = _uint64             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _float32 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_UInt64, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__uint64)) < 0) __PYX_ERR(0, 2840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2842
 * types.UInt64 = _uint64
 * 
 * cdef _SchemaType _float32 = _SchemaType()             # <<<<<<<<<<<<<<
 * _float32.thisptr = capnp.SchemaType(capnp.TypeWhichFLOAT32)
 * types.Float32 = _float32
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__float32));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__float32, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2843
 * 
 * cdef _SchemaType _float32 = _SchemaType()
 * _float32.thisptr = capnp.SchemaType(capnp.TypeWhichFLOAT32)             # <<<<<<<<<<<<<<
 * types.Float32 = _float32
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__float32->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::FLOAT32);

  /* "capnp/lib/capnp.pyx":2844
 * cdef _SchemaType _float32 = _SchemaType()
 * _float32.thisptr = capnp.SchemaType(capnp.TypeWhichFLOAT32)
 * types.Float32 = _float32             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _float64 = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Float32, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__float32)) < 0) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2846
 * types.Float32 = _float32
 * 
 * cdef _SchemaType _float64 = _SchemaType()             # <<<<<<<<<<<<<<
 * _float64.thisptr = capnp.SchemaType(capnp.TypeWhichFLOAT64)
 * types.Float64 = _float64
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__float64));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__float64, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2847
 * 
 * cdef _SchemaType _float64 = _SchemaType()
 * _float64.thisptr = capnp.SchemaType(capnp.TypeWhichFLOAT64)             # <<<<<<<<<<<<<<
 * types.Float64 = _float64
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__float64->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::FLOAT64);

  /* "capnp/lib/capnp.pyx":2848
 * cdef _SchemaType _float64 = _SchemaType()
 * _float64.thisptr = capnp.SchemaType(capnp.TypeWhichFLOAT64)
 * types.Float64 = _float64             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _text = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Float64, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__float64)) < 0) __PYX_ERR(0, 2848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2850
 * types.Float64 = _float64
 * 
 * cdef _SchemaType _text = _SchemaType()             # <<<<<<<<<<<<<<
 * _text.thisptr = capnp.SchemaType(capnp.TypeWhichTEXT)
 * types.Text = _text
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__text));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__text, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2851
 * 
 * cdef _SchemaType _text = _SchemaType()
 * _text.thisptr = capnp.SchemaType(capnp.TypeWhichTEXT)             # <<<<<<<<<<<<<<
 * types.Text = _text
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__text->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::TEXT);

  /* "capnp/lib/capnp.pyx":2852
 * cdef _SchemaType _text = _SchemaType()
 * _text.thisptr = capnp.SchemaType(capnp.TypeWhichTEXT)
 * types.Text = _text             # <<<<<<<<<<<<<<
 * 
 * cdef _SchemaType _data = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Text, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__text)) < 0) __PYX_ERR(0, 2852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2854
 * types.Text = _text
 * 
 * cdef _SchemaType _data = _SchemaType()             # <<<<<<<<<<<<<<
 * _data.thisptr = capnp.SchemaType(capnp.TypeWhichDATA)
 * types.Data = _data
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__data));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__data, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2855
 * 
 * cdef _SchemaType _data = _SchemaType()
 * _data.thisptr = capnp.SchemaType(capnp.TypeWhichDATA)             # <<<<<<<<<<<<<<
 * types.Data = _data
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__data->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::DATA);

  /* "capnp/lib/capnp.pyx":2856
 * cdef _SchemaType _data = _SchemaType()
 * _data.thisptr = capnp.SchemaType(capnp.TypeWhichDATA)
 * types.Data = _data             # <<<<<<<<<<<<<<
 * 
 * # cdef _SchemaType _list = _SchemaType()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_Data, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__data)) < 0) __PYX_ERR(0, 2856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2874
 * # types.interface = _interface
 * 
 * cdef _SchemaType _any_pointer = _SchemaType()             # <<<<<<<<<<<<<<
 * _any_pointer.thisptr = capnp.SchemaType(capnp.TypeWhichANY_POINTER)
 * types.AnyPointer = _any_pointer
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5capnp_3lib_5capnp__SchemaType)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(((PyObject *)__pyx_v_5capnp_3lib_5capnp__any_pointer));
  __Pyx_DECREF_SET(__pyx_v_5capnp_3lib_5capnp__any_pointer, ((struct __pyx_obj_5capnp_3lib_5capnp__SchemaType *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2875
 * 
 * cdef _SchemaType _any_pointer = _SchemaType()
 * _any_pointer.thisptr = capnp.SchemaType(capnp.TypeWhichANY_POINTER)             # <<<<<<<<<<<<<<
 * types.AnyPointer = _any_pointer
 * 
 */
  __pyx_v_5capnp_3lib_5capnp__any_pointer->thisptr =  ::capnp::Type( ::capnp::schema::Type::Which::ANY_POINTER);

  /* "capnp/lib/capnp.pyx":2876
 * cdef _SchemaType _any_pointer = _SchemaType()
 * _any_pointer.thisptr = capnp.SchemaType(capnp.TypeWhichANY_POINTER)
 * types.AnyPointer = _any_pointer             # <<<<<<<<<<<<<<
 * 
 * cdef class _ListSchema:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_AnyPointer, ((PyObject *)__pyx_v_5capnp_3lib_5capnp__any_pointer)) < 0) __PYX_ERR(0, 2876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2932
 *         return _ParsedSchema()._init_child(self.thisptr_child.getNested(name))
 * 
 * class _StructABCMeta(type):             # <<<<<<<<<<<<<<
 *     """A metaclass for the Type.Reader and Type.Builder ABCs."""
 *     def __instancecheck__(cls, obj):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyType_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyType_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyType_Type)));
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_StructABCMeta, __pyx_n_s_StructABCMeta, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, __pyx_kp_s_A_metaclass_for_the_Type_Reader); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "capnp/lib/capnp.pyx":2934
 * class _StructABCMeta(type):
 *     """A metaclass for the Type.Reader and Type.Builder ABCs."""
 *     def __instancecheck__(cls, obj):             # <<<<<<<<<<<<<<
 *         return isinstance(obj, cls.__base__) and obj.schema == cls._schema
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_14_StructABCMeta_1__instancecheck__, 0, __pyx_n_s_StructABCMeta___instancecheck, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_instancecheck, __pyx_t_7) < 0) __PYX_ERR(0, 2934, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "capnp/lib/capnp.pyx":2932
 *         return _ParsedSchema()._init_child(self.thisptr_child.getNested(name))
 * 
 * class _StructABCMeta(type):             # <<<<<<<<<<<<<<
 *     """A metaclass for the Type.Reader and Type.Builder ABCs."""
 *     def __instancecheck__(cls, obj):
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_StructABCMeta, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_StructABCMeta, __pyx_t_7) < 0) __PYX_ERR(0, 2932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":2944
 *     return msg
 * 
 * class _StructModuleWhich(object):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__174); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__174, __pyx_n_s_StructModuleWhich, __pyx_n_s_StructModuleWhich, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_StructModuleWhich, __pyx_tuple__174, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2944, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_StructModuleWhich, __pyx_t_3) < 0) __PYX_ERR(0, 2944, __pyx_L1_error)
  __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;

  /* "capnp/lib/capnp.pyx":2947
 *     pass
 * 
 * class _StructModule(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, schema, name):
 *         self.schema = schema
 */
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__175); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__175, __pyx_n_s_StructModule, __pyx_n_s_StructModule, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "capnp/lib/capnp.pyx":2948
 * 
 * class _StructModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_1__init__, 0, __pyx_n_s_StructModule___init, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_3, __pyx_t_3) < 0) __PYX_ERR(0, 2948, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2967
 *                 setattr(self, name, sub_module)
 * 
 *     def read(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the unpacked object read from file.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_3read, 0, __pyx_n_s_StructModule_read, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__180);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read, __pyx_t_3) < 0) __PYX_ERR(0, 2967, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2982
 *         reader = _StreamFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)
 *     def read_multiple(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_5read_multiple, 0, __pyx_n_s_StructModule_read_multiple, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__183);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read_multiple, __pyx_t_3) < 0) __PYX_ERR(0, 2982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3000
 *         reader = _MultipleMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader
 *     def read_packed(self, file, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the packed object read from file.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_7read_packed, 0, __pyx_n_s_StructModule_read_packed, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__186);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read_packed, __pyx_t_3) < 0) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3015
 *         reader = _PackedFdMessageReader(file, traversal_limit_in_words, nesting_limit)
 *         return reader.get_root(self.schema)
 *     def read_multiple_packed(self, file, traversal_limit_in_words = None, nesting_limit = None, skip_copy = False):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_9read_multiple_packed, 0, __pyx_n_s_StructModule_read_multiple_pack, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__189);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read_multiple_packed, __pyx_t_3) < 0) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3033
 *         reader = _MultiplePackedMessageReader(file, self.schema, traversal_limit_in_words, nesting_limit, skip_copy)
 *         return reader
 *     def read_multiple_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_11read_multiple_bytes, 0, __pyx_n_s_StructModule_read_multiple_byte, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__192);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read_multiple_bytes, __pyx_t_3) < 0) __PYX_ERR(0, 3033, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3048
 *         reader = _MultipleBytesMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader
 *     def read_multiple_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns an iterable, that when traversed will return Readers for messages.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_13read_multiple_bytes_packed, 0, __pyx_n_s_StructModule_read_multiple_byte_2, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__195);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_read_multiple_bytes_packed, __pyx_t_3) < 0) __PYX_ERR(0, 3048, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3063
 *         reader = _MultipleBytesPackedMessageReader(buf, self.schema, traversal_limit_in_words, nesting_limit)
 *         return reader
 *     def from_bytes(self, buf, traversal_limit_in_words = None, nesting_limit = None, builder=False):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the unpacked object in buf.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_15from_bytes, 0, __pyx_n_s_StructModule_from_bytes, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__198);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_from_bytes, __pyx_t_3) < 0) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3087
 *             message = _FlatArrayMessageReader(buf, traversal_limit_in_words, nesting_limit)
 *             return message.get_root(self.schema)
 *     def from_segments(self, segments, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for a list of segment bytes.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_17from_segments, 0, __pyx_n_s_StructModule_from_segments, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__201);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_from_segments, __pyx_t_3) < 0) __PYX_ERR(0, 3087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3098
 *         message = _SegmentArrayMessageReader(segments, traversal_limit_in_words, nesting_limit)
 *         return message.get_root(self.schema)
 *     def from_bytes_packed(self, buf, traversal_limit_in_words = None, nesting_limit = None):             # <<<<<<<<<<<<<<
 *         """Returns a Reader for the packed object in buf.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_19from_bytes_packed, 0, __pyx_n_s_StructModule_from_bytes_packed, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__204);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_from_bytes_packed, __pyx_t_3) < 0) __PYX_ERR(0, 3098, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3113
 *         """
 *         return _PackedMessageReaderBytes(buf, traversal_limit_in_words, nesting_limit).get_root(self.schema)
 *     def __call__(self, num_first_segment_words=None, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)
 *     def new_message(self, num_first_segment_words=None, **kwargs):
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_21__call__, 0, __pyx_n_s_StructModule___call, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__207);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_call, __pyx_t_3) < 0) __PYX_ERR(0, 3113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3115
 *     def __call__(self, num_first_segment_words=None, **kwargs):
 *         return self.new_message(num_first_segment_words=num_first_segment_words, **kwargs)
 *     def new_message(self, num_first_segment_words=None, **kwargs):             # <<<<<<<<<<<<<<
 *         """Returns a newly allocated builder message.
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_13_StructModule_23new_message, 0, __pyx_n_s_StructModule_new_message, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__210);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_new_message, __pyx_t_3) < 0) __PYX_ERR(0, 3115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":2947
 *     pass
 * 
 * class _StructModule(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, schema, name):
 *         self.schema = schema
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_StructModule, __pyx_tuple__175, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_StructModule, __pyx_t_3) < 0) __PYX_ERR(0, 2947, __pyx_L1_error)
  __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;

  /* "capnp/lib/capnp.pyx":3128
 *         return _new_message(self, kwargs, num_first_segment_words)
 * 
 * class _InterfaceModule(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, schema, name):
 *         def server_init(server_self):
 */
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__211); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__211, __pyx_n_s_InterfaceModule, __pyx_n_s_InterfaceModule, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "capnp/lib/capnp.pyx":3129
 * 
 * class _InterfaceModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         def server_init(server_self):
 *             pass
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_16_InterfaceModule_1__init__, 0, __pyx_n_s_InterfaceModule___init, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_3, __pyx_t_3) < 0) __PYX_ERR(0, 3129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3135
 *         self.Server = type(name + '.Server', (_DynamicCapabilityServer,), {'__init__': server_init, 'schema':schema})
 * 
 *     def _new_client(self, server):             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityClient()._init_vals(self.schema, server)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_16_InterfaceModule_3_new_client, 0, __pyx_n_s_InterfaceModule__new_client, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_new_client, __pyx_t_3) < 0) __PYX_ERR(0, 3135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3138
 *         return _DynamicCapabilityClient()._init_vals(self.schema, server)
 * 
 *     def _new_server(self, server):             # <<<<<<<<<<<<<<
 *         return _DynamicCapabilityServer(self.schema, server)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_16_InterfaceModule_5_new_server, 0, __pyx_n_s_InterfaceModule__new_server, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_new_server, __pyx_t_3) < 0) __PYX_ERR(0, 3138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3128
 *         return _new_message(self, kwargs, num_first_segment_words)
 * 
 * class _InterfaceModule(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, schema, name):
 *         def server_init(server_self):
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_InterfaceModule, __pyx_tuple__211, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_InterfaceModule, __pyx_t_3) < 0) __PYX_ERR(0, 3128, __pyx_L1_error)
  __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;

  /* "capnp/lib/capnp.pyx":3141
 *         return _DynamicCapabilityServer(self.schema, server)
 * 
 * class _EnumModule(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, schema, name):
 *         self.schema = schema
 */
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__218); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__218, __pyx_n_s_EnumModule, __pyx_n_s_EnumModule, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "capnp/lib/capnp.pyx":3142
 * 
 * class _EnumModule(object):
 *     def __init__(self, schema, name):             # <<<<<<<<<<<<<<
 *         self.schema = schema
 *         for name, val in schema.enumerants.items():
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_11_EnumModule_1__init__, 0, __pyx_n_s_EnumModule___init, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_3, __pyx_t_3) < 0) __PYX_ERR(0, 3142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "capnp/lib/capnp.pyx":3141
 *         return _DynamicCapabilityServer(self.schema, server)
 * 
 * class _EnumModule(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, schema, name):
 *         self.schema = schema
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EnumModule, __pyx_tuple__218, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EnumModule, __pyx_t_3) < 0) __PYX_ERR(0, 3141, __pyx_L1_error)
  __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;

  /* "capnp/lib/capnp.pyx":3195
 *         return ret
 * 
 *     def load(self, file_name, display_name=None, imports=[]):             # <<<<<<<<<<<<<<
 *         """Load a Cap'n Proto schema from a file
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__84 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3921
 *         PyBuffer_Release(&self.view)
 * 
 * def _message_to_packed_bytes(_MessageBuilder message):             # <<<<<<<<<<<<<<
 *     r, w = _os.pipe()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_23_message_to_packed_bytes, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_message_to_packed_bytes, __pyx_t_1) < 0) __PYX_ERR(0, 3921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3936
 *     return ret
 * 
 * def _write_message_to_fd(int fd, _MessageBuilder message):             # <<<<<<<<<<<<<<
 *     """Serialize a Cap'n Proto message to a file descriptor
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_25_write_message_to_fd, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_write_message_to_fd, __pyx_t_1) < 0) __PYX_ERR(0, 3936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3961
 *     schema_cpp.writeMessageToFd(fd, deref(message.thisptr))
 * 
 * def _write_packed_message_to_fd(int fd, _MessageBuilder message):             # <<<<<<<<<<<<<<
 *     """Serialize a Cap'n Proto message to a file descriptor in a packed manner
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_27_write_packed_message_to_fd, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_write_packed_message_to_fd, __pyx_t_1) < 0) __PYX_ERR(0, 3961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3987
 *     schema_cpp.writePackedMessageToFd(fd, deref(message.thisptr))
 * 
 * _global_schema_parser = None             # <<<<<<<<<<<<<<
 * 
 * def cleanup_global_schema_parser():
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_global_schema_parser, Py_None) < 0) __PYX_ERR(0, 3987, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":3989
 * _global_schema_parser = None
 * 
 * def cleanup_global_schema_parser():             # <<<<<<<<<<<<<<
 *     """Unloads all of the schema from the current context"""
 *     global _global_schema_parser
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_29cleanup_global_schema_parser, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cleanup_global_schema_parser, __pyx_t_1) < 0) __PYX_ERR(0, 3989, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":3996
 *         _global_schema_parser = None
 * 
 * def load(file_name, display_name=None, imports=[]):             # <<<<<<<<<<<<<<
 *     """Load a Cap'n Proto schema from a file
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__132 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_31load, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_load_2, __pyx_t_1) < 0) __PYX_ERR(0, 3996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4032
 *     return _global_schema_parser.load(file_name, display_name, imports)
 * 
 * class _Loader:             # <<<<<<<<<<<<<<
 *     def __init__(self, fullname, path, additional_paths):
 *         self.fullname = fullname
 */
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Loader, __pyx_n_s_Loader, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "capnp/lib/capnp.pyx":4033
 * 
 * class _Loader:
 *     def __init__(self, fullname, path, additional_paths):             # <<<<<<<<<<<<<<
 *         self.fullname = fullname
 *         self.path = path
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_7_Loader_1__init__, 0, __pyx_n_s_Loader___init, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_3, __pyx_t_2) < 0) __PYX_ERR(0, 4033, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4044
 *         self.additional_paths = additional_paths
 * 
 *     def load_module(self, fullname):             # <<<<<<<<<<<<<<
 *         assert self.fullname == fullname, (
 *             "invalid module, expected %s, got %s" % (
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_7_Loader_3load_module, 0, __pyx_n_s_Loader_load_module, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_load_module, __pyx_t_2) < 0) __PYX_ERR(0, 4044, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4032
 *     return _global_schema_parser.load(file_name, display_name, imports)
 * 
 * class _Loader:             # <<<<<<<<<<<<<<
 *     def __init__(self, fullname, path, additional_paths):
 *         self.fullname = fullname
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Loader, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Loader, __pyx_t_2) < 0) __PYX_ERR(0, 4032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4056
 *         return module
 * 
 * class _Importer:             # <<<<<<<<<<<<<<
 *     def __init__(self, additional_paths):
 *         self.extension = '.capnp'
 */
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Importer, __pyx_n_s_Importer, (PyObject *) NULL, __pyx_n_s_capnp_lib_capnp, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "capnp/lib/capnp.pyx":4057
 * 
 * class _Importer:
 *     def __init__(self, additional_paths):             # <<<<<<<<<<<<<<
 *         self.extension = '.capnp'
 *         self.additional_paths = additional_paths
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_9_Importer_1__init__, 0, __pyx_n_s_Importer___init, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init_3, __pyx_t_2) < 0) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4060
 *         self.extension = '.capnp'
 *         self.additional_paths = additional_paths
 *     def find_module(self, fullname, package_path=None):             # <<<<<<<<<<<<<<
 *         if fullname in _sys.modules: # Don't allow re-imports
 *             return None
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5capnp_3lib_5capnp_9_Importer_3find_module, 0, __pyx_n_s_Importer_find_module, NULL, __pyx_n_s_capnp_lib_capnp, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__238);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_find_module, __pyx_t_2) < 0) __PYX_ERR(0, 4060, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "capnp/lib/capnp.pyx":4056
 *         return module
 * 
 * class _Importer:             # <<<<<<<<<<<<<<
 *     def __init__(self, additional_paths):
 *         self.extension = '.capnp'
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Importer, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Importer, __pyx_t_2) < 0) __PYX_ERR(0, 4056, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4108
 *                     return _Loader(fullname, join_path(path, capnp_module_name_spaces), self.additional_paths)
 * 
 * _importer = None             # <<<<<<<<<<<<<<
 * 
 * def add_import_hook(additional_paths=[]):
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_importer, Py_None) < 0) __PYX_ERR(0, 4108, __pyx_L1_error)

  /* "capnp/lib/capnp.pyx":4110
 * _importer = None
 * 
 * def add_import_hook(additional_paths=[]):             # <<<<<<<<<<<<<<
 *     """Add a hook to the python import system, so that Cap'n Proto modules are directly importable
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__139 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_33add_import_hook, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_import_hook, __pyx_t_1) < 0) __PYX_ERR(0, 4110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4147
 *     _sys.meta_path.append(_importer)
 * 
 * def remove_import_hook():             # <<<<<<<<<<<<<<
 *     """Remove the import hook, and return python's import to normal"""
 *     global _importer
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_35remove_import_hook, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_import_hook, __pyx_t_1) < 0) __PYX_ERR(0, 4147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":4154
 *     _importer = None
 * 
 * def _init_capnp_api():             # <<<<<<<<<<<<<<
 *     """ Initialize static function pointers for cdef api functions. """
 *     init_capnp_api()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_37_init_capnp_api, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_init_capnp_api, __pyx_t_1) < 0) __PYX_ERR(0, 4154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__DynamicResizableListBuilder(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_39__pyx_unpickle__DynamicResizableListBuilder, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__DynamicResizable, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle__DynamicResizableListBuilder__set_state(<_DynamicResizableListBuilder> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__DynamicResizableListBuilder__set_state(_DynamicResizableListBuilder __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._field = __pyx_state[0]; __pyx_result._list = __pyx_state[1]; __pyx_result._message = __pyx_state[2]; __pyx_result._parent = __pyx_state[3]; __pyx_result._schema = __pyx_state[4]
 *     if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_41__pyx_unpickle__DynamicEnumField, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__DynamicEnumField, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__MessageSize(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_43__pyx_unpickle__MessageSize, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__MessageSize, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":11
 *         __pyx_unpickle__MessageSize__set_state(<_MessageSize> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle__MessageSize__set_state(_MessageSize __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result.cap_count = __pyx_state[0]; __pyx_result.word_count = __pyx_state[1]
 *     if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_45__pyx_unpickle__DynamicCapabilityServer, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__DynamicCapabilit, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle__MultipleBytesMessageReader(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5capnp_3lib_5capnp_47__pyx_unpickle__MultipleBytesMessageReader, NULL, __pyx_n_s_capnp_lib_capnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle__MultipleBytesMes, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "capnp/lib/capnp.pyx":1
 * # capnp.pyx             # <<<<<<<<<<<<<<
 * # distutils: language = c++
 * # distutils: libraries = capnpc capnp-rpc capnp kj-async kj
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "array.pxd":161
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 * 
 * cdef inline void zero(array self):             # <<<<<<<<<<<<<<
 *     """ set all elements of array to zero. """
 *     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
 */

  /*--- Wrapped vars code ---*/

  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_7);
  __Pyx_XDECREF(__pyx_t_8);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init capnp.lib.capnp", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init capnp.lib.capnp");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
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);
}
#endif

/* GetBuiltinName */
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;
}

/* RaiseArgTupleInvalid */
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);
}

/* RaiseDoubleKeywords */
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
}

/* ParseKeywords */
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_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
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(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
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(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;
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#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

/* PyObjectCallMethO */
#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

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#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

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallOneArg */
#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) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    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

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    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;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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_FAST_THREAD_STATE
    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_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    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;
    #endif
    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;
}

/* GetItemInt */
static 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_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_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_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_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_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(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(__Pyx_is_valid_index(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))
                        return NULL;
                    PyErr_Clear();
                }
            }
            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));
}

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    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_PyThreadState_assign
    __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 (cause) {
        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 = __Pyx_PyThreadState_Current;
        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

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = Py_TYPE(iter)->tp_iternext;
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
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);
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* WriteUnraisableException */
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;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __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
}

/* None */
static CYTHON_INLINE int64_t __Pyx_mod_int64_t(int64_t a, int64_t b) {
    int64_t r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* KeywordStringCheck */
static 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_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;
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            if (PY_VERSION_HEX >= 0x030700A0) {
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            } else {
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            }
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        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);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    if (likely(cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
            return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
            #else
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
            #endif
        }
        #if PY_VERSION_HEX >= 0x030700A0
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
        #endif
    }
    return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(3);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 1, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 2, arg2);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(3, self, arg1, arg2);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* append */
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;
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_FALSE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_TRUE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_TRUE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* FetchCommonType */
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;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    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;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, 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 (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_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;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    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(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    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_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(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, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, 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_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } 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(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = _PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            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, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
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(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    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, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            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;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
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);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    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 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    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, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    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, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    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 *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    PyObject_GC_Track(gen);
    return gen;
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PatchModuleWithCoroutine */
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;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#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 (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "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;
}

/* Coroutine */
static void __Pyx_CoroutineAwait_dealloc(PyObject *self) {
    PyObject_GC_UnTrack(self);
    Py_CLEAR(((__pyx_CoroutineAwaitObject*)self)->coroutine);
    PyObject_GC_Del(self);
}
static int __Pyx_CoroutineAwait_traverse(__pyx_CoroutineAwaitObject *self, visitproc visit, void *arg) {
    Py_VISIT(self->coroutine);
    return 0;
}
static int __Pyx_CoroutineAwait_clear(__pyx_CoroutineAwaitObject *self) {
    Py_CLEAR(self->coroutine);
    return 0;
}
static PyObject *__Pyx_CoroutineAwait_Next(__pyx_CoroutineAwaitObject *self) {
    return __Pyx_Generator_Next(self->coroutine);
}
static PyObject *__Pyx_CoroutineAwait_Send(__pyx_CoroutineAwaitObject *self, PyObject *value) {
    return __Pyx_Coroutine_Send(self->coroutine, value);
}
static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args) {
    return __Pyx_Coroutine_Throw(self->coroutine, args);
}
static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self->coroutine);
}
static PyObject *__Pyx_CoroutineAwait_self(PyObject *self) {
    Py_INCREF(self);
    return self;
}
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_CoroutineAwait_no_new(CYTHON_UNUSED PyTypeObject *type, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwargs) {
    PyErr_SetString(PyExc_TypeError, "cannot instantiate type, use 'await coroutine' instead");
    return NULL;
}
#endif
static PyMethodDef __pyx_CoroutineAwait_methods[] = {
    {"send", (PyCFunction) __Pyx_CoroutineAwait_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_CoroutineAwait_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_CoroutineAwait_Close, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")},
    {0, 0, 0, 0}
};
static PyTypeObject __pyx_CoroutineAwaitType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "coroutine_wrapper",
    sizeof(__pyx_CoroutineAwaitObject),
    0,
    (destructor) __Pyx_CoroutineAwait_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    PyDoc_STR("A wrapper object implementing __await__ for coroutines."),
    (traverseproc) __Pyx_CoroutineAwait_traverse,
    (inquiry) __Pyx_CoroutineAwait_clear,
    0,
    0,
    __Pyx_CoroutineAwait_self,
    (iternextfunc) __Pyx_CoroutineAwait_Next,
    __pyx_CoroutineAwait_methods,
    0                         ,
    0                      ,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if !CYTHON_COMPILING_IN_PYPY
    __Pyx_CoroutineAwait_no_new,
#else
    0,
#endif
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
#if PY_VERSION_HEX < 0x030500B1 || defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS
static CYTHON_INLINE PyObject *__Pyx__Coroutine_await(PyObject *coroutine) {
    __pyx_CoroutineAwaitObject *await = PyObject_GC_New(__pyx_CoroutineAwaitObject, __pyx_CoroutineAwaitType);
    if (unlikely(!await)) return NULL;
    Py_INCREF(coroutine);
    await->coroutine = coroutine;
    PyObject_GC_Track(await);
    return (PyObject*)await;
}
#endif
#if PY_VERSION_HEX < 0x030500B1
static PyObject *__Pyx_Coroutine_await_method(PyObject *coroutine, CYTHON_UNUSED PyObject *arg) {
    return __Pyx__Coroutine_await(coroutine);
}
#endif
#if defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS
static PyObject *__Pyx_Coroutine_await(PyObject *coroutine) {
    if (unlikely(!coroutine || !__Pyx_Coroutine_Check(coroutine))) {
        PyErr_SetString(PyExc_TypeError, "invalid input, expected coroutine");
        return NULL;
    }
    return __Pyx__Coroutine_await(coroutine);
}
#endif
static PyObject *
__Pyx_Coroutine_get_frame(CYTHON_UNUSED __pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    Py_RETURN_NONE;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1
static PyObject *__Pyx_Coroutine_compare(PyObject *obj, PyObject *other, int op) {
    PyObject* result;
    switch (op) {
        case Py_EQ: result = (other == obj) ? Py_True : Py_False; break;
        case Py_NE: result = (other != obj) ? Py_True : Py_False; break;
        default:
            result = Py_NotImplemented;
    }
    Py_INCREF(result);
    return result;
}
#endif
static PyMethodDef __pyx_Coroutine_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next iterated value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next iterated value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")},
#if PY_VERSION_HEX < 0x030500B1
    {"__await__", (PyCFunction) __Pyx_Coroutine_await_method, METH_NOARGS,
     (char*) PyDoc_STR("__await__() -> return an iterator to be used in await expression.")},
#endif
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Coroutine_memberlist[] = {
    {(char *) "cr_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "cr_await", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being awaited, or None")},
    {(char*) "cr_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Coroutine_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the coroutine"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the coroutine"), 0},
    {(char *) "cr_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the coroutine"), 0},
    {0, 0, 0, 0, 0}
};
#if CYTHON_USE_ASYNC_SLOTS
static __Pyx_PyAsyncMethodsStruct __pyx_Coroutine_as_async = {
    __Pyx_Coroutine_await,
    0,
    0,
};
#endif
static PyTypeObject __pyx_CoroutineType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "coroutine",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
#if CYTHON_USE_ASYNC_SLOTS
    &__pyx_Coroutine_as_async,
#else
    0,
#endif
    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,
#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1
    __Pyx_Coroutine_compare,
#else
    0,
#endif
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    0,
    __pyx_Coroutine_methods,
    __pyx_Coroutine_memberlist,
    __pyx_Coroutine_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_Coroutine_init(void) {
    __pyx_CoroutineType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_CoroutineType = __Pyx_FetchCommonType(&__pyx_CoroutineType_type);
    if (unlikely(!__pyx_CoroutineType))
        return -1;
#ifdef __Pyx_IterableCoroutine_USED
    if (unlikely(__pyx_IterableCoroutine_init() == -1))
        return -1;
#endif
    __pyx_CoroutineAwaitType = __Pyx_FetchCommonType(&__pyx_CoroutineAwaitType_type);
    if (unlikely(!__pyx_CoroutineAwaitType))
        return -1;
    return 0;
}

/* GetAwaitIter */
static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o) {
#ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(o)) {
        return __Pyx_NewRef(o);
    }
#endif
    return __Pyx__Coroutine_GetAwaitableIter(o);
}
static void __Pyx_Coroutine_AwaitableIterError(PyObject *source) {
#if PY_VERSION_HEX >= 0x030600B3 || defined(_PyErr_FormatFromCause)
    _PyErr_FormatFromCause(
        PyExc_TypeError,
        "'async for' received an invalid object "
        "from __anext__: %.100s",
        Py_TYPE(source)->tp_name);
#elif PY_MAJOR_VERSION >= 3
    PyObject *exc, *val, *val2, *tb;
    assert(PyErr_Occurred());
    PyErr_Fetch(&exc, &val, &tb);
    PyErr_NormalizeException(&exc, &val, &tb);
    if (tb != NULL) {
        PyException_SetTraceback(val, tb);
        Py_DECREF(tb);
    }
    Py_DECREF(exc);
    assert(!PyErr_Occurred());
    PyErr_Format(
        PyExc_TypeError,
        "'async for' received an invalid object "
        "from __anext__: %.100s",
        Py_TYPE(source)->tp_name);
    PyErr_Fetch(&exc, &val2, &tb);
    PyErr_NormalizeException(&exc, &val2, &tb);
    Py_INCREF(val);
    PyException_SetCause(val2, val);
    PyException_SetContext(val2, val);
    PyErr_Restore(exc, val2, tb);
#else
    source++;
#endif
}
static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *obj) {
    PyObject *res;
#if CYTHON_USE_ASYNC_SLOTS
    __Pyx_PyAsyncMethodsStruct* am = __Pyx_PyType_AsAsync(obj);
    if (likely(am && am->am_await)) {
        res = (*am->am_await)(obj);
    } else
#endif
#if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact)
    if (PyCoro_CheckExact(obj)) {
        return __Pyx_NewRef(obj);
    } else
#endif
#if CYTHON_COMPILING_IN_CPYTHON && defined(CO_ITERABLE_COROUTINE)
    if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) {
        return __Pyx_NewRef(obj);
    } else
#endif
    {
        PyObject *method = NULL;
        int is_method = __Pyx_PyObject_GetMethod(obj, __pyx_n_s_await, &method);
        if (likely(is_method)) {
            res = __Pyx_PyObject_CallOneArg(method, obj);
        } else if (likely(method)) {
            res = __Pyx_PyObject_CallNoArg(method);
        } else
            goto slot_error;
        Py_DECREF(method);
    }
    if (unlikely(!res)) {
        __Pyx_Coroutine_AwaitableIterError(obj);
        goto bad;
    }
    if (unlikely(!PyIter_Check(res))) {
        PyErr_Format(PyExc_TypeError,
                     "__await__() returned non-iterator of type '%.100s'",
                     Py_TYPE(res)->tp_name);
        Py_CLEAR(res);
    } else {
        int is_coroutine = 0;
        #ifdef __Pyx_Coroutine_USED
        is_coroutine |= __Pyx_Coroutine_Check(res);
        #endif
        #if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact)
        is_coroutine |= PyCoro_CheckExact(res);
        #endif
        if (unlikely(is_coroutine)) {
            /* __await__ must return an *iterator*, not
               a coroutine or another awaitable (see PEP 492) */
            PyErr_SetString(PyExc_TypeError,
                            "__await__() returned a coroutine");
            Py_CLEAR(res);
        }
    }
    return res;
slot_error:
    PyErr_Format(PyExc_TypeError,
                 "object %.100s can't be used in 'await' expression",
                 Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* CoroutineYieldFrom */
static PyObject* __Pyx__Coroutine_Yield_From_Generic(__pyx_CoroutineObject *gen, PyObject *source) {
    PyObject *retval;
    PyObject *source_gen = __Pyx__Coroutine_GetAwaitableIter(source);
    if (unlikely(!source_gen)) {
        return NULL;
    }
    if (__Pyx_Coroutine_Check(source_gen)) {
        retval = __Pyx_Generator_Next(source_gen);
    } else {
#if CYTHON_USE_TYPE_SLOTS
        retval = Py_TYPE(source_gen)->tp_iternext(source_gen);
#else
        retval = PyIter_Next(source_gen);
#endif
    }
    if (retval) {
        gen->yieldfrom = source_gen;
        return retval;
    }
    Py_DECREF(source_gen);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source) {
    PyObject *retval;
    if (__Pyx_Coroutine_Check(source)) {
        if (unlikely(((__pyx_CoroutineObject*)source)->yieldfrom)) {
            PyErr_SetString(
                PyExc_RuntimeError,
                "coroutine is being awaited already");
            return NULL;
        }
        retval = __Pyx_Generator_Next(source);
#ifdef __Pyx_AsyncGen_USED
    } else if (__pyx_PyAsyncGenASend_CheckExact(source)) {
        retval = __Pyx_async_gen_asend_iternext(source);
#endif
    } else {
        return __Pyx__Coroutine_Yield_From_Generic(gen, source);
    }
    if (retval) {
        Py_INCREF(source);
        gen->yieldfrom = source;
    }
    return retval;
}

/* ReturnWithStopIteration */
static void __Pyx__ReturnWithStopIteration(PyObject* value) {
    PyObject *exc, *args;
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_PYSTON
    __Pyx_PyThreadState_declare
    if ((PY_VERSION_HEX >= 0x03030000 && PY_VERSION_HEX < 0x030500B1)
            || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) {
        args = PyTuple_New(1);
        if (unlikely(!args)) return;
        Py_INCREF(value);
        PyTuple_SET_ITEM(args, 0, value);
        exc = PyType_Type.tp_call(PyExc_StopIteration, args, NULL);
        Py_DECREF(args);
        if (!exc) return;
    } else {
        Py_INCREF(value);
        exc = value;
    }
    #if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    #if CYTHON_USE_EXC_INFO_STACK
    if (!__pyx_tstate->exc_info->exc_type)
    #else
    if (!__pyx_tstate->exc_type)
    #endif
    {
        Py_INCREF(PyExc_StopIteration);
        __Pyx_ErrRestore(PyExc_StopIteration, exc, NULL);
        return;
    }
    #endif
#else
    args = PyTuple_Pack(1, value);
    if (unlikely(!args)) return;
    exc = PyObject_Call(PyExc_StopIteration, args, NULL);
    Py_DECREF(args);
    if (unlikely(!exc)) return;
#endif
    PyErr_SetObject(PyExc_StopIteration, exc);
    Py_DECREF(exc);
}

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* MergeKeywords */
static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
    PyObject *iter, *key = NULL, *value = NULL;
    int source_is_dict, result;
    Py_ssize_t orig_length, ppos = 0;
    iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict);
    if (unlikely(!iter)) {
        PyObject *args;
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        args = PyTuple_Pack(1, source_mapping);
        if (likely(args)) {
            PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
            Py_DECREF(args);
            if (likely(fallback)) {
                iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict);
                Py_DECREF(fallback);
            }
        }
        if (unlikely(!iter)) goto bad;
    }
    while (1) {
        result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
        if (unlikely(result < 0)) goto bad;
        if (!result) break;
        if (unlikely(PyDict_Contains(kwdict, key))) {
            __Pyx_RaiseDoubleKeywordsError("function", key);
            result = -1;
        } else {
            result = PyDict_SetItem(kwdict, key, value);
        }
        Py_DECREF(key);
        Py_DECREF(value);
        if (unlikely(result < 0)) goto bad;
    }
    Py_XDECREF(iter);
    return 0;
bad:
    Py_XDECREF(iter);
    return -1;
}

/* CythonFunctionShared */
#include <structmember.h>
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    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 = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    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 = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    if (unlikely(op == NULL))
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
#if PY_MAJOR_VERSION < 3
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
#endif
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module_2, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

/* None */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS
#define __Pyx_PyInt_RemainderObjC_ZeroDivisionError(operand)\
    if (unlikely(zerodivision_check && ((operand) == 0))) {\
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");\
        return NULL;\
    }
#endif
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            __Pyx_PyInt_RemainderObjC_ZeroDivisionError(b)
            x = a % b;
            x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_remainder(op1, op2);
            }
        }
                __Pyx_PyInt_RemainderObjC_ZeroDivisionError(b)
                x = a % b;
                x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla % llb;
                llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS
#define __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(operand)\
    if (unlikely(zerodivision_check && ((operand) == 0))) {\
        PyErr_SetString(PyExc_ZeroDivisionError, "integer division by zero");\
        return NULL;\
    }
#endif
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(b)
            if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a))
                return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2);
            else {
                long q, r;
                q = a / b;
                r = a - q*b;
                q -= ((r != 0) & ((r ^ b) < 0));
                x = q;
            }
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2);
            }
        }
                __Pyx_PyInt_FloorDivideObjC_ZeroDivisionError(b)
                {
                    long q, r;
                    q = a / b;
                    r = a - q*b;
                    q -= ((r != 0) & ((r ^ b) < 0));
                    x = q;
                }
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                {
                    PY_LONG_LONG q, r;
                    q = lla / llb;
                    r = lla - q*llb;
                    q -= ((r != 0) & ((r ^ llb) < 0));
                    llx = q;
                }
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
}
#endif

/* None */
static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_traverse != current_tp_traverse)
        type = type->tp_base;
    while (type && type->tp_traverse == current_tp_traverse)
        type = type->tp_base;
    if (type && type->tp_traverse)
        return type->tp_traverse(obj, v, a);
    return 0;
}

/* CallNextTpClear */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    while (type && type->tp_clear == current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_clear)
        type->tp_clear(obj);
}

/* SetVTable */
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;
}

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    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 ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* PatchInspect */
static PyObject* __Pyx_patch_inspect(PyObject* module) {
#if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT)
    static int inspect_patched = 0;
    if (unlikely((!inspect_patched) && module)) {
        module = __Pyx_Coroutine_patch_module(
            module, ""
"old_types = getattr(_module.isgenerator, '_cython_generator_types', None)\n"
"if old_types is None or not isinstance(old_types, set):\n"
"    old_types = set()\n"
"    def cy_wrap(orig_func, type=type, cython_generator_types=old_types):\n"
"        def cy_isgenerator(obj): return type(obj) in cython_generator_types or orig_func(obj)\n"
"        cy_isgenerator._cython_generator_types = cython_generator_types\n"
"        return cy_isgenerator\n"
"    _module.isgenerator = cy_wrap(_module.isgenerator)\n"
"old_types.add(_cython_generator_type)\n"
        );
        inspect_patched = 1;
    }
#else
    if ((0)) return __Pyx_Coroutine_patch_module(module, NULL);
#endif
    return module;
}

/* PatchAsyncIO */
static PyObject* __Pyx_patch_asyncio(PyObject* module) {
#if PY_VERSION_HEX < 0x030500B2 &&\
        (defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED)) &&\
        (!defined(CYTHON_PATCH_ASYNCIO) || CYTHON_PATCH_ASYNCIO)
    PyObject *patch_module = NULL;
    static int asyncio_patched = 0;
    if (unlikely((!asyncio_patched) && module)) {
        PyObject *package;
        package = __Pyx_Import(__pyx_n_s_asyncio_coroutines, NULL, 0);
        if (package) {
            patch_module = __Pyx_Coroutine_patch_module(
                PyObject_GetAttrString(package, "coroutines"), ""
"try:\n"
"    coro_types = _module._COROUTINE_TYPES\n"
"except AttributeError: pass\n"
"else:\n"
"    if _cython_coroutine_type is not None and _cython_coroutine_type not in coro_types:\n"
"        coro_types = tuple(coro_types) + (_cython_coroutine_type,)\n"
"    if _cython_generator_type is not None and _cython_generator_type not in coro_types:\n"
"        coro_types = tuple(coro_types) + (_cython_generator_type,)\n"
"_module._COROUTINE_TYPES = coro_types\n"
            );
        } else {
            PyErr_Clear();
            package = __Pyx_Import(__pyx_n_s_asyncio_tasks, NULL, 0);
            if (unlikely(!package)) goto asyncio_done;
            patch_module = __Pyx_Coroutine_patch_module(
                PyObject_GetAttrString(package, "tasks"), ""
"if hasattr(_module, 'iscoroutine'):\n"
"    old_types = getattr(_module.iscoroutine, '_cython_coroutine_types', None)\n"
"    if old_types is None or not isinstance(old_types, set):\n"
"        old_types = set()\n"
"        def cy_wrap(orig_func, type=type, cython_coroutine_types=old_types):\n"
"            def cy_iscoroutine(obj): return type(obj) in cython_coroutine_types or orig_func(obj)\n"
"            cy_iscoroutine._cython_coroutine_types = cython_coroutine_types\n"
"            return cy_iscoroutine\n"
"        _module.iscoroutine = cy_wrap(_module.iscoroutine)\n"
"    if _cython_coroutine_type is not None:\n"
"        old_types.add(_cython_coroutine_type)\n"
"    if _cython_generator_type is not None:\n"
"        old_types.add(_cython_generator_type)\n"
            );
        }
        Py_DECREF(package);
        if (unlikely(!patch_module)) goto ignore;
asyncio_done:
        PyErr_Clear();
        asyncio_patched = 1;
#ifdef __Pyx_Generator_USED
        {
            PyObject *inspect_module;
            if (patch_module) {
                inspect_module = PyObject_GetAttr(patch_module, __pyx_n_s_inspect_2);
                Py_DECREF(patch_module);
            } else {
                inspect_module = __Pyx_Import(__pyx_n_s_inspect_2, NULL, 0);
            }
            if (unlikely(!inspect_module)) goto ignore;
            inspect_module = __Pyx_patch_inspect(inspect_module);
            if (unlikely(!inspect_module)) {
                Py_DECREF(module);
                module = NULL;
            }
            Py_XDECREF(inspect_module);
        }
#else
        if ((0)) return __Pyx_patch_inspect(module);
#endif
    }
    return module;
ignore:
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch asyncio package with custom generator type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    if ((0)) return __Pyx_patch_inspect(__Pyx_Coroutine_patch_module(module, NULL));
#endif
    return module;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
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);
}

/* AddTraceback */
#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;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    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(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
    const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
#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;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) ((int) 0 - (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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) ((long) 0 - (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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
    const int64_t neg_one = (int64_t) ((int64_t) 0 - (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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        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);
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value) {
    const uint16_t neg_one = (uint16_t) ((uint16_t) 0 - (uint16_t) 1), const_zero = (uint16_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint16_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint16_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint16_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint16_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
    const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(unsigned int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned 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 (unsigned int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) {
                            return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) {
                            return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) >= 4 * PyLong_SHIFT) {
                            return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned 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 (unsigned int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            unsigned int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(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 (unsigned int) -1;
        }
    } else {
        unsigned int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned int) -1;
        val = __Pyx_PyInt_As_unsigned_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned int");
    return (unsigned int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned int");
    return (unsigned int) -1;
}

/* CIntFromPy */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
    const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } 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) (-(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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(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;
}

/* CIntFromPy */
static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
    const int64_t neg_one = (int64_t) ((int64_t) 0 - (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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } 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) (-(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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(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;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) ((int) 0 - (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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } 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) (-(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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(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;
}

/* CIntFromPy */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
    const size_t neg_one = (size_t) ((size_t) 0 - (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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } 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) (-(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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(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;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) ((long) 0 - (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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } 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) (-(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))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(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;
}

/* CIntFromPy */
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG) ((PY_LONG_LONG) 0 - (PY_LONG_LONG) 1), const_zero = (PY_LONG_LONG) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PY_LONG_LONG) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PY_LONG_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 (PY_LONG_LONG) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, digit, digits[0])
                case 2:
                    if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) >= 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) >= 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) >= 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_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 (PY_LONG_LONG) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PY_LONG_LONG) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PY_LONG_LONG,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((((PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) (((PY_LONG_LONG)-1)*(((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PY_LONG_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(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (PY_LONG_LONG) ((((((((((PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PY_LONG_LONG) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PY_LONG_LONG val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(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 (PY_LONG_LONG) -1;
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PY_LONG_LONG) -1;
        val = __Pyx_PyInt_As_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PY_LONG_LONG");
    return (PY_LONG_LONG) -1;
}

/* CIntFromPy */
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) ((unsigned PY_LONG_LONG) 0 - (unsigned PY_LONG_LONG) 1), const_zero = (unsigned PY_LONG_LONG) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(unsigned PY_LONG_LONG) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned PY_LONG_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 (unsigned PY_LONG_LONG) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 2 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 3 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_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(unsigned PY_LONG_LONG) >= 4 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        }
                    }
                    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 (unsigned PY_LONG_LONG) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned PY_LONG_LONG) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) ((((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) ((((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_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(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_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(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) ((((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            unsigned PY_LONG_LONG val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(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 (unsigned PY_LONG_LONG) -1;
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned PY_LONG_LONG) -1;
        val = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned PY_LONG_LONG");
    return (unsigned PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned PY_LONG_LONG");
    return (unsigned PY_LONG_LONG) -1;
}

/* Generator */
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_Method, 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")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {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 CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
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;
}

/* FunctionExport */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* InitStrings */
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;
        if (PyObject_Hash(*t->p) == -1)
            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 const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    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
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(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
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __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)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } 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 int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  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(b);
  }
#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_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
